Is this a guaranteed formula? No such thing exists in the Kingdom of God.
However, these are sound principles that encourage immersion in Scripture, prayer, and fellowship. These actions give God the space to change your heart and enable you to overcome the sin of lust.
Many times this has worked for me in my own battle!