Your poor boy 
It really does sound like constipation, I have had 2 Ds's suffer. One is now in his teens and it was sorted years and years ago. One is 6 and getting there.
With the second one it's been a lot harder. Firstly we found he had some allergies which we think were causing constipation. We took these things out of his diet which did improve things a little, but he then began witholding poo because he had learnt that it hurt to go to the toilet. This in turn caused him to be constipated again.
With the constipation, runny poo does still leak out around the blockage, which can make you think they are not constipated. Also, because of the constipation, they cannot feel the sensation of needing to go. I have heard it can take as long as they have had the problem for the sensation to return, so it can be a long hard slog i'm afraid.
With our DS we are pretty sure he is no longer constipated so it's just a matter of retraining. It has become very much psychological, but he has also told us he doesn't always know when he needs to go.
So we now have a chart. On it there is a sticker each day for the following:
trying after each meal
Following any signs of needing a poo - such as wind or tummy ache
Having a poo on the toilet
Having clean pants at the end of the day
Going to the toilet without being reminded.
If he has a poo, clean pants and is not reminded in a day, then he gets a coin. He then has a piece of paper where we write a toy he wants. Each time he gets a coin, he can colour one letter in. When all the letters are coloured in, he can buy the toy with the money from the pot (you may have to write a long sentence with the name of the toy in to make sure the amount of money is correct!)
There is NO punishment or anything for a bad day, he just does not get his coin.
Something else we did, which may be controversial, is one day after his pants were a bit messy, we got him to smell the trousers he had been wearing (they were not messy at all). We wanted him to realise what his classmates would smell. This was not a proper poo in pants, just hanging on cos he didn't want to go. It seems that they really don't notice the smell at the time, but after this he said he didn't want to be smelly any more.
He is doing really fantastically and hasn't had dirty pants in ages 
With regard to the school, I think it's appalling, although I believe very common. My other DS, who has never had this problem, one day had terrible runs at school and didn't make it to the toilet in time (he was in reception). When I picked him up the TA apologised profusely that he had not been cleaned, but he wouldn't let them. So all they could do was give him wipes and clean clothes for him to try himself. Obviously he was in a right state, but they would have done it if needed.
I can also see though that it is very difficult to keep changing a child, but I personally could not leave a child in that state.
Maybe this week you could try giving him lactulose (I am amazed the GP hasn't given it) and even start a chart to see if that can help. He probably has lost the sensation telling him he needs to go and needs to retrain his body. But for now if he tries lots of times, he may catch it at the right time and give him some confidence.
Have you tried the school nurse? Ours was helpful with DS1