On a theological level, sometimes we receive thorns for the purpose of our deepening trust in God and relying upon Him to deliver us. Your quote about the rosary is apt when you take the prayer to be a call to meditate upon and surround yourself with. Perhaps another spiritual re-direction is apt - watching The Passion of the Christ or immersing yourself in the Presence of the Sacrament, or at least seeking refuge on Holy Ground. Have you prayed the Rite of Exorcism? It’s not necessarily a case of demonic obsession (though it’s not outside their realm to convulse us with lustful thoughts) but the uniting of your conscious will with the desire of the Church to keep us undefiled by the world and focused on Christ can only help.
From a practical perspective, I find sniffing vinegar helps dull some thoughts - not like enough to cause hypoxia, just to put enough of a bad taste in your nostrils and mouth that you stop “running hot” from the sinful thought. Physical activity helps too - running can redirect sexual urges into constructive physical effort. And what helps most is time - the longer you’re away from it, the less you’ll obsess about it. I find that the image or thought gets loudest as it’s going away, fighting to stay in my mind though I do not let it.