Sometimes when my daughter is playing, she will have a little routine/ritual. For example, she will have to go over and say something to my son, then go touch the garbage can, then turn on the lights and do this cycle a few times over. That's just one example. Is it helpful to get them out of doing rituals and redirect their attention or are you supposed to let them do it?
I suffer from OCD. I used to do rituals like this before medication. These rituals are actually an attempt to relieve anxiety. If your not able to do them the anxiety grows. There is also CBT to deal with this. I agree with pp that it should be dealt with or it will spiral out of control.
We used to let our guys do a ritual if touching things before bed because it seemed pretty harmless. The problem came in when new parts kept being to the ritual. It came up over time but it got to the point where the ritual involved about 25 steps and took over a half an hour. It was out if control. We agonized over it but when a professional told me that those early OCD habits, if not stopped early, can be really detrimental. They need more appropriate ways to direct their energy. In school it isn't going to be ok if they need to touch every lightswitch in the room before they go out for recess.
So one night we said, sorry we're not doing that tonight. And it was awful and stayed awful for two or three nights but then they got over it and it hasn't come back. We still have to deal with more minor OCD behaviors but it doesn't impact their function.
People always ask if we're in line to check out. I always say, "No, he's sniffing the gums and Tic-tacs." If I have to leave quickly, I tell him he has 5 more gums to smell and then we leave. Otherwise, if it's not hurting anyone, I let him do it.
I agree if you let it go on it often does get worse. If it is not harming anything I would start slow right now and try some redirection when you see it happening. Do not really push them to hard though because you do not want to make the situation worse when you do not have to. This is where therapies like ABA come into play, but I would caution the same thing because if the therapist is to pushy you may run into problems. This is the importance of a good therapist that knows what to do and when to stop. IF things were really bad meds could be involved as well, but it does not sound like you are at that point yet.
I would let them do it, it makes them feel safe and confident Over time you will learn how to get them to move to something else. Remember every child is different and will respond to different cues