Hi, I meant to reply to this the other day and I forgot.
My Dd2 is nearly 5 and has the same problem as your Ds. Since she was about 3/4 she started to have episodes where she would be washing her hands alot, these would continue for a day or two and then she would seem to forget about it and stop.
As she got older the gap between these episodes has got shorter and the length of them longer.
I took her to our g.p in the end as she had got cracked sore hands and was becoming emtionally distressed at the thought of having germs on her hands or others having germs on their hands. One night she wouldn't even let me tuck her into bed because she said I had dirty hands and she went mad when I touched her quilt.
The g.p reffered her to a clinical psychologist. TBH the appointment wasn't really what I'd hoped, as the psych seemed to almost blame for not doing more to stop dd when it first started.
She told dd that she was now only allowed to wash her hands after using the toilet and only once. She said I had to be very strict about this and physically restrain dd if she tried to wash them when she shouldn't.
Thankfully I have only had to physically restrain her twice since her appointment (which was about 3 mths ago). She seemd to accept someone else telling her that there was no need to keep washing her hands better than me telling her.
Dd is alot better than she was but the problem does still keep coming back. Only last night I overheard her telling dd1 to go and wash her hands. Dd2 would not let her touch one of her toys as she said dd1 had dirty hands because they don't have soap in the junior toilets (they do).
Also dd has twice recently got up in the night complaining that her hands are dirty and saying that she forgot to wash them. I don't let her re wash them although this does upset her.
Dd has a follow up appointment next month but tbh I don't think they will suggest anything else at all as they don't seem to be that bothered by it.
I think I would go and see your g.p about it as you sound like you need help in knowing how to deal with it as I did. I was never sure wether to let her wash them or not.
Other than that I would just say that at the moment not to make a big thing about it. Try and discourage it but if he gets upset, let him carry on until you have seen a professional and got proper advice.
Good luck