K.P.
I would suggest trying a toileting schedule. It's pretty easy and I'm sure your son's teacher would be on board! Just have him go to the bathroom every hour and "try". If he's really involved in what he's doing, he may not realize that he has to go to the bathroom. Set a timer, make a visual reminder, whatever works for your son!
If he doesn't have to go, then no harm done. My experience with young children though is that they just don't pay attention to their body when they are doing something more interesting. If you draw his attention to it, he'll have an "oh yeah, forget" moment and run to the bathroom.