Been there
Damn, I had this exact same thinking problem for a few years. It recently went away because my mind picked up something new (way worse) What I had to do though was I had to FULLY understand everything.. things would pop into my head and i'd have to seriousely think it out until my mind was satisfied with the outcome.. Even if I totally understood it, my mind would doubt me and say I didn't fully get it. Sounds weird but it ate up a lot of time. What I found worked really well was doing your best NOT to think about it when it pops up and eventually you forget about it.. i know it's super hard to do honestly but it worked a few times.. Do it enough and u'll get better and better at it.
For me, it's all about rituals that don't make sense now. For instance.. I have tourettes as well and if I move or flex my arm a certain way, my OCD will say "you didn't do it THIS way or THAT way" so i'll try it again and again and again until i'm exhausted and every single time, my OCD makes up something that I didn't do that i was "Supposed" to do while flexing my arm. I know that makes NO sense but it's very distressing and causes tons of anxiety because sometimes I'll just let it go and it'll bother me saying that I didn't do it right.. Usually i'll obsess until i sit down and try it again and hopefully get it "right" it's a never ending cycle!!
Does anyone here know if an urge or obsession like that will go away afterwhile if you DON'T attempt the ritual?
BTW, if you aren't on any SSRI's or anything, i'd recommend getting some 5HTP at any store.. It puts serotonin back in your brain and seems to help BIGTIME!! I've been on it now for a few weeks.