Are the kindergarten washrooms "open concept"? My son avoided the preschool washrooms for BMs because they were like a bus stop without any privacy. Instead he held it in, hoping to make it until the time I would pick him up at night. It did not always work... Sometimes 3 accidents per week. He was not really able to tell me that the privacy issue bothered him, but once he did, I arranged with the teachers that he could use a lockable stall in a different room and encouraged him to let the teachers know on time. That finally worked..
Then there was another phase when he started eating a lot of cheese and much less vegetables than before, combined with some food intolerance - and suddenly he was constipated for the first time. It almost turned into encopresis until we drastically changed his diet. Anyway, after a few constipated BMs, he kept mentioning he "could not feel when to go" which I thought was just a lame excuse. But I learned later that a child`s nerves in that area can be numb for weeks after constipation and some actually do lose their ability to know when to go for a while.
If you think there is any constipation involved, be patient, change the diet to more fibre, vegetables, fruit, lots of water and give him the benefit of a doubt. My son actually cried when we spoke about too much cheese and toast being the culprit and not his "unability". He was looking forward to changing his diet and it worked for good.
Check if the teacher is allowing frequent potty trips, some dont and it does cause problems ,children dont always like to ask to go, teachers need to be aware of this and have potty breaks ,he probably do a full bowel movement as he doesnt feel it, could he have had some Diaharea, check his diet to see what he is eating.