Go to a Naturopathic Doctor or pediatric Gastroenterologist (Nat doctor preferred and have them do a full Stool analysis and IGge test to determine if the cause could be celiac or other food sensitivities and see how gut bacteria balance is. If removing gluten helps but doesn't cure 100% it could be a dairy problem on top if celiac or gluten sensitivity, or SIBO (small Intestinal bacterial overgrowth) good luck hope this saves you time and money that would be wasted on regular doctors (no offense)
Encopresis is one aspect, impaction is another but just have a healthy diet and adjust accordingly. In other words, diet does have something to do with a healthy body.
no need for the child to go trough that, it is encrepsis, give a diet high in fiber, bran cereals water fruit juices. A regular healthy stool is better than a painful one
The two symptoms that I see as red flags are: 1. the width of the stool, and 2. that it causes pain to the point that the child has a fear of going to the bathroom.
He could be suffering from Encopresis.
www.mayoclinic.com/health/encopresis/DS00885
I took my son (5 years old) to see a Pediatric Gastroenterologist when he was complaining that he was afraid to go to the bathroom; he was diagnosed with encopresis, which is relatively common in children over the age of 4.
The GI specialist said that a healthy bm for a young child would make an "S shape" and be the consistency of "oatmeal".
thats NORMAL..lol..when your young its normal because your bowels are clean and clear,as you get older,they get clogged up some and you have smaller or looser stools.
dont worry about it,in the case bigger IS better