I know of several children who are in years 2, 3 & 4 who deliberately wet or soil themselves when things don’t go their way. It’s another way of exerting control, something that seems to be becoming more noticeable in recent years.
One of my children had toileting issues due to SEN, another one had toilet issues for no apparent reason. I worked with the school and, although I offered to come in when anything happened with either, they never took me up on it. I did make sure both had a couple of sets of easy to put on clothes, wipes and carrier bags in their backpacks and encouraged them to change themselves with support if needed. I am forever grateful to the TAs that worked with them, they kept everything so discreet that no other child ever noticed or teased them (this went on up to and including year 4).
I think parents should be responsible for their children, there just aren’t enough TAs in schools anymore to, pardon the pun, mop these things up along with supporting SEN children.