I have had this problem with my 7 year old daughter since she was an infant. I've tried everything made for children. Nothing has really worked well. I have most recently started to monitor her fiber intake. I am adding fiber rich foods anywhere I can. Blueberries are especially effective. She is finally having regular bowel movements. In her case (which could be the same as your son) it is always painful for her to go so she just tries not to. Now that her stool is getting more loose it doesn't hurt and the problem is resolving. Just keep an eye on the dietary fiber...you don't want to give him too loose of stool either. Good Luck!
Another vote for the glycerine suppositories - but, to motivate him to stop witholding, you should warn him that you'll put a suppository in him everytime he doesn't do a smelly on the lavatory for three whole days.
There's a definite link between bad behavior, and autointoxication resulting from constipation. Look up Dr Kurt Woeller's article on autism. My parents knew about this link and that's why they were so strict about their daughters' bowel functions.
sounds rough. have you tried any mild laxatives to help him. Like maybe give him 1 and let him see how it feels to go and not have it hurt?
my son was like this for a few months. it sounds gross, but I gave him a fleet glycerin suppository....well, i let him insert it and it worked. he learned how to go without it hurting
and in the future, it helped, because when he was having trouble going, we just allow him to take 1 of them.
let me know if this helps.