Yeah, I think the best thing to do about upsetting thoughts is learn to just move on. Don’t even tell yourself to stop thinking about it. Just drop it.
That’s not an easy thing to do at first, but if you know to do it, you can work on it. It might help to have a topic ready to go so you don’t have to come up with something else to think about on the spot, and maybe change it up sometimes so you don’t start to associate the two things. And it’s something you can actively practice; deliberately think about something unpleasant for just a moment and quickly move on to something else. It’s much easier when you’re prepared for it.
That’s just my experience, of course. No guarantee it works for everyone.
You mentioned feeling guilty before, so I’m guessing you’re still struggling with self-acceptance? I think working on that is the most important thing. Self-control is easier when you’re comfortable with who you are and what you do. Trying to suppress or avoid thoughts and feelings just makes them more insistent.
But in the short term, maybe it’d be helpful to think of it like this. You wouldn’t do anything inappropriate when there are adults watching, right? Ten, twenty years on, those kids will remember. Even if there aren’t adults around in the present, they’re always watching from the future.