I didn't realize until I was 17 year old that most people have an ability to "fantasize". That was a long time ago now, and I'm still imaginatively-challenged. I hope to have it figured out soon.
https://en.wikipedia.org/wiki/Aphantasia
If I'd been able to fantasize, I certainly wouldn't have lost countless hours to looking at women on the internet. I've got over the compulsion about 6 months, even though I still don't have an imagination.
I suspect that the proper way to inoculate children against internet porn is to tell them mater-of-fact how reproduction works before they hit puberty, and help them develop their inner 'fantasy' world.