M.C.
My 4y is going through the constipation thing too. Basically the messy underwear is her body fighting her. Gravity is doing its job, and she's holding it in. I tried increasing her fat intake. Gave her a bag of fritos at lunch to munch on. That worked for a few days.
We have done the Fleet Child suppositories, which she hates!, but were necessary. Our pediatrician even had I try 1 piece of chocolate exlax, which worked once. Then she had an episode where neither of those two things did anything. At the 5 day mark she was literally sitting on the toilet all day shaking with no progress. I took her to the ER where they gave her a liquid enima and kept trying until she went. It took 3 trys over 2.5 hours. Now she is on 2 tsp. of Miralax a day. When we try to cut back the problems start to come back.