This is not fun. It's good that she's pooping some, anyway--as long as she can't hold it completely, it's better....
Ds started this after he was out of diapers. I think it has to do with control, and also fear after a poop hurt once. I have found that the worst thing I could do was to let it become a power struggle--it was important that he not see pooping as something *I needed* for him to do. I wasn't perfect in this, which is how I learned that power struggles made it worse.
The best thing to do....was to play with him at bathroom time. We hava a character called "hand" (like a sock puppet with no sock) who is afraid of everything adn doesn't know anything. He also faints at the smell of poop. Anything that could make ds giggle when he was struggling with this really helped relieve the tension and fear. Also watching his diet like a hawk so that he wouldn't get hard dry poops--keeping it soft so it wouldn't hurt, and explaining to him that prunes, etc etc would keep it soft (not "make you poop," which he didn't want) so he could feel some control.
I don't know the solution, except he has gotten less this way as he's gotten older. Physical and mental changes both, I think. And don't ever think that you have this dumb little problem that shouldn't be such a big deal. It can wreck your whole train--do whatever you can to take care of yourself and your family through it.