My son went through the same thing. He was potty trained for peeing before he turned 3. But he kept wanting to poop in his diapers. Sometimes he wouldn't poop until his bowels were relaxed enough in his sleep. There is a name for it. It is called "encopresis". We were at our wits end with our son and the doctors just kept prescribing Miralax which didn't seem to work. I ended up going on the internet and found a doctor in Michigan that has created a whole plan called "Soiling Solutions" to cure encopresis. It had a money-back guarantee so we bought it. My son was cured in 3 DAYS!!! We were ecstatic and amazed. Let me know if you have any more questions.