A few problems are as difficult as rhythm when you play the organ.
Usually rhythm starts to be challenging when something changes in your piece. As long as an episode moves in similar rhythmical values, you're OK. You figure it out once and continue on autopilot.
I remember such places especially when a section with eighth-note triplets transitions into eighth-notes. Like at the end of the 2nd page of BWV 546. When I was a student and first learned this piece that's the place where I got stuck rhythmically. I would involuntarily speed up, I think.
The key is count out loud and always subdivide the beats.
No, you can't rely on doing it in your mind silently, you have to utter the numbers "1 and 2 and 3 and 4 and" aloud. Otherwise you get carried by your own irregular playing.
It's not easy for beginners, I know that. But there's no other way.
In order to connect the rhythms of different episodes, you have to connect the pulse too.