they make me feel physically horrendous.
Do you know where this comes from?
For example, some people get brought up being taught that evil thoughts make a person evil or impure (in which case, there's a core belief there that you could tackle). Or perhaps noticing that men are looking at kids causes you emotional flashbacks of your own abuse (in which case processing your own trauma could help).
Because for me? The thoughts gradually occur less and less when I repeatedly remind myself, "There's those thoughts again, but I'm not worried about them being there".
There's 2 steps: first deciding that the thoughts themselves are neither good nor bad, they're just thoughts. Second, acknowledging they're there when they pop up and gently reminding yourself that thoughts are just thoughts.
Because unless you act on the thoughts, they really are nothing more than one of the billions of thoughts that fly through our head each day. We don't actually have a lot of control over what thoughts we have, and often? Our brain can go some pretty weird places. The thoughts only stick around and become significant if we're attaching some significance or behaviour to them.
If the fact that you can think these thoughts is distressing you, like "This says something bad about my character", maybe delve into where that judgment is coming from. Why are you judging yourself based on what are just thoughts? Where did that habit come from? Is it reasonable to judge yourself like your own private Thought Police, especially given your history?
Because looked at from where I'm standing, what you're saying is "I get concerned about the safety of kids easily". That's hardly a bad thing. And it's pretty understandable. The more important issue seems to be why you're judging yourself negatively in a situation that needs no judging (or justification) at all... And that is definitely something you could work through with your T, potentially resolving a much bigger issue than this one. Which would be awesome!