I have had a bit of an issue with intrusive thoughts in the past, and this sounds a lot like that. Tbh, for me the thing I need to do in those moments is ground myself, pronto. For me, they’re a very similar experience to flashbacks.
Separately, but similarly, there are a few key phrases I was programmed with which elicit programmed, traumatic responses. They have been much harder to knock over. I’m usually very dissociated when they hit - and if I hear certain phrases, I’ll most often dissociate instantly. And then do other things.
Again, the single most important thing I need to do when that happens is ground. And ground hard. Right back to the hear and now. Those ones I need to hit with freezing water to the face type stuff, or a freezing shower (usually clothed). And then I need to set things up so that I’ll be prompted to re-focus on grounding myself repeatedly, usually for at least a good 2 hours. They knock me round a lot.
As back up, if I’m fortunate enough to be at home when it happens? I PRN the shit out of myself and sleep it off, which is my failsafe way to ride out those really intense flashbacks and dissociative events. For a long time, I needed my dog with me in public to keep myself safe from those.
I’ve made enough progress in therapy that I no longer need that, but to be honest - it isn’t a coincidence that I switched from an office job to working with animals. Keeping myself grounded throughout the day has always been the most effective way at really limiting how often that happens, and how intense it is when it does.