Hi J.,
We went through something similar with our son. Once kids have painful experiences with pooping, they often try to keep it in, which can cause constipation/hard stools despite all you are giving her to help the situation (our pediatric GI told us our son was likely doing this, and he was on milk of magnesia). Also, sometimes kids will strain really hard because of the constipation/hard stools. That hurts and can give them something charmingly called anal fissures. Anyway, his doc put him on Miralax. We also had to use 1/2 of a children's Fleet glycerin suppository on rare occasion to help him out. A 1/4 dose of the adult size also worked, though I would definitely check w/ a doc before using either product. Also, ask her doc to check for fissures. If she has them, a stool softener might be necessary. At the very least, you'll know she'll be in pain until they heal. Also, her stools might be acidic, which would hurt w/ fissures, too. Our son had GERD, so he was taking Prevacid for acid (and another med for motility). We did not like having him on so many meds, but they made a huge difference. The doc also had us give him Pediasure instead of milk (soy milk had not helped at all). When he was a bit older, we also had to explain many times (in a non-punitive tone) that it was super important for him to try to poop as soon as he felt like he had to and that he should just sit on the toilet, relax and be patient -- not push so that he would poop immediately after sitting on the toilet. He needed to understand that sometimes, even though it feels like you have to go, you have to wait a little bit before you actually can go. We encouraged him to breathe deeply and relax. He was older than your daughter at this point, though. At your daughter's age, we mainly relied on meds as nothing else seemed to help. From our experience and from what our son's ped GI told us, I would guess that your daughter, having experienced pain, is trying not to poop, which makes the situation worse. Just like you said, the stool then makes kind of a plug. The GI was telling us this and then (and this is rather unsavory) put her gloved finger in our son's anus (he was about your daughter's age at this point) and out came a whole bunch of poop that was just sitting in there. Now, I am not at all saying that you should do that! Rather, I'm thinking that your daughter might be creating the same situation that our son did: making the difficulty and pain worse because she's trying to avoid the pain. Our pediatrician, who has a great reputation, was only helpful to a point. I highly recommend you get a specialist, a pediatric gastroenterologist, to examine her daughter. Our son grew out of his needs for his meds sometime between 3.5 and 4 years old. Most kids do not take that long, though. I know how tough it is to watch your child in so much pain, and I wish you the best.
K.