The devil generally tempts us through our inner pride and weak tendencies. Yet the idea of escaping from the devil's stratagems comes from Jesus' own words: "Pray not to be put to the test" (Lk. 22:40, 46). I believe that he meant that we should not be overcome by the trials of life, either from the temptations of the devil, the world and our own fleshly weakness or inner pride. The devil usually paints evil under the guise of good. You are in the midst of the world with all the fleeting allurements, trials and temptations..."In the world but not of the world" (Jn. 17:15).
A sure escape therefore is what Jesus strongly suggests: "Pray." St. Alphonsus de Liguori used to say: "Who prays is saved." So many powerful prayers there are, like the rosary of the Virgin Mary, the chaplet of Divine Mercy, etc. I just want to mention the chaplet referred to by St. Faustina in her book: Diary of Divine Mercy in My Soul" (words of Jesus to her soul). "Say unceasingly the chaplet that I have taught you. Whoever will recite it will receive great mercy at the hour of death. Priests will recommend it to sinners as their last hope of salvation. Even if there were a sinner most hardened, if he were to recite this chaplet only once, he would receive grace from My infinite mercy. I desire that the whole world know my infinite mercy. I desire to grant unimaginable graces to those souls who trust in My mercy." (paragraph 687). "Write that when they say this chaplet in the presence of the dying, I will stand between My Father and the dying person, not as the just Judge but as the merciful Savior" (paragraph 1541).
While I mention vocal prayers as important, certainly this has to be accompanied by mental prayer or meditation which is a normal counterpart of standard prayer, as mind or soul and body go together. So in the book of Sirach 7:40 (or Ecclesiasticus) you read: "In everything you do, remember your end, and you will never sin." That concise English proverb carries deep meaning: "Prayer will make us leave off sinning or sinning will make us leave off prayer." In that same pragraph 1541 of St. Faustina's book on Divine Mercy, the Savior assures her of God's mercy for repentant sinners: "These souls have a right of priority to My compassionate Heart, they have first access to my mercy. I delight particularly in a soul which has placed its trust in My goodness." The Holy Bible confirms this in the 3 parables of God's mercy (the lost sheep, the lost drachma, and the prodigal son) which you read in Luke, chapter 15. God's merciful heart ever awaits you!