It depends on what he needs you for. Can he get his clothing on and off by himself? Does he have difficult bm's and need you for moral support? Does he know how to clean up afterward?
If you're pretty sure he simply wants you there but can handle all the details himself, then start weaning him gently. You might accompany him to the bathroom until he's begun the process, then remark that you need to go take care of X. Do this more and more frequently, and he'll get used to it. At some point, when he asks for your assistance, just tell him you're proud that he can do it himself now, and when he's done and had washed his hands, you'll be happy to do something together that he likes.
My grandson is 5.5, but not yet always thorough at wiping himself after a poop. His mom still checks on him occasionally. I think that's pretty normal up through the 5th year, but he does need to take care of his own process at preschool, and seems to do a reasonable job of it.