The world has an amazing lie: porn is the same as fucking a hooker. None of the ancients agree, though porn existwd then, for example erotic dances you could watch, paintings and drawings, and statues nude and having sex. They never equates porn or masturbation with actual sex.
Masturbation is never a kind of sex in antiquity.
There is the story of Onan who spulled his jizz, rather than umpregnate one of (sort of) his wives. but that's a completely different situation.
Bottom line, what the world (including 100% of popes, churches, preachers, etc.) gets wrong about universal ancient morality is that if you have not had sex you have achieved something.
They want to ensnare you by a false doctrine which they apply to nothing else. For example, if they watch a movie where there is a bad guy who does terrible thngs (Saw 2) they hold they are in the position of the good guy in the stoey despite enjoying the movie. but the same they do not afford the porn watcher. they don't say, "you who eatch porn, you qre the window curtains, or the microphone, or the lamp, or the uninvolved extra." so we see the nonsense. but you also can't say back "you are guilty just as much of murder if you watch movies with murders in them". stupid as well.
theater existed for a long time. but you will notice there is no condemnation of theater or other types of scandalous productions.
so, there are zero in all the world in any of the religions who has the least but of spiritual wisdom or power. they are ignorant of everything.