Regular castration is an option too, look into it, research it.
Penectomy is not out of the question if it is necessary.
The reality is you can obsess about it, feel guilty and confess. As a humanist, I think sin, at it’s core, is when you treat objects like people, and people like objects.
Or you can do what is natural for a few minutes, get a release and go about your day a happy person. “Sin” is measured by how you affect others and it affects yourself. If you’re spending it on porn and masturbation, and not saving it for your spouse, I think you can consider it harmful there.
For years and years I had beat myself up over it, and like the man shown here, I was constantly looking for the magic key that would help me overcome it once and for all and I always assumed I was the worst guy in the room.