This is actually form of ocd. We've started my son with a therapist that specializes and there are different forms of ocd. This is such a good read, copy and paste it into your browser. https://childmind.org/article/ocd-sexual-obsessions/ People always think OCD is something that has an impulse associated with the obsession but in reality, it literally can just be thoughts. The compulsion can be reassurance for the intrusive thought. OCD IS treatable. Exposure Response therapy is the gold standard in psychotherapy and has a high success rate. My understanding is that while it is uncomfortable while undergoing the therapy, it sets you up in order to deal with ocd (whether thoughts or otherwise and compulsions) in the future. Medication often comes into play if the ocd is causing great havoc in your life like it does my son's. But it is that psychotherapy specifically for ocd which is said to have the greatest impact for overcoming it.
First, if you're truly pansexual, what's the problem? Maybe you're using that incorrectly, but if that's true than you have already decided that for you everything turns you on so why should this be a problem? More, it sounds like you've been spending a lot of time reading about this stuff and when you have an anxiety problem you can really get obsessive about stuff. Most of us don't really go around tossing around words like cis and all that, we just are who we are. The people who talk like that are activists, not people just going about their lives no matter how that life goes. Sexual fantasies are just that, fantasies. They're fine. They spice life up. I'm a completely heterosexual guy and haven't had a trans thought in my life but I have fantasized about being a woman. Why not? I've also fantasized about lots of other things. They're just thoughts. What you've done because of your disease is become afraid of thinking, and if you can fix that, these will just be interesting thoughts, not problems. If you pursue them, they will be the things you do, not problems. Now, actions define us more than our fantasies. If you've never acted out in a trans way, you're not trans. Anything you did when you were 8 is irrelevant to the adult version of you. Kids have unbounded curiosity and it's too bad we lose that but we do. As for OCD, it isn't causing you to do anything, the way you think is causing the OCD. Doesn't make it easy to fix, but if you keep thinking of it as controlling you it will. Are you in therapy for this? I'm also not convinced there is such a thing as TOCD. There's only one OCD. But there are a ton of phobias and anxiety and fears and so it doesn't matter what you call it, they're all based on us getting to a place where our thinking has become unhealthy for us not because of the thoughts as everyone thinks all the time but how we react to them. Again, if you can fix that, you won't have the problem anymore, but you will still have fantasies. They just won't bother you anymore. If you can't fix it in therapy and it's ruining your life, medication might be necessary, but it's always better to fix things than medicate them. Peace.