We are just getting through this ourselves with our almost 4-year-old girl. I've heard and read it is VERY common (in fact her twin brother went through it as well on a smaller scale when he potty trained about 9 months ago). My daughter will basically hold herself for up to a number of days (I think the longest was almost 4?) and then finally let it out and it's painful for her which starts a vicious cycle. She ruined many a pair of underwear (which I eventually did throw out - I got sick of washing them). I was getting very frustrated and like another poster said, it became very much a control issue. I'd know she'd need to go and would approach her on it, encourage her, etc. and she'd just get very frustrated and deny, deny, deny she even needed to go. It would turn into a power struggle. Then when she'd have the accident, I'd be upset and that would upset her, etc.
Finally, I just completely stopped talking about it and returned to reward mode (I used to give them an M&M for every successful poop on the potty when they first started training along with a sticker chart - I just went back to the M&M this time). If she had an accident, I'd not say a word and would just change her and not make any deal out of it (VERY hard to do but so effective). Carried an extra change of clothes with us in the car. And when she did go (completely on her own, it turns out - without needing any direction or encouragement from me), I'd praise her and hand out the M&M and we'd move on. I hate to jinx myself but she's been accident free now for a few weeks. I truly believe it had become a total control issue. Now that it's entirely in her hands and I have no negative reaction to it, she's sort of taken it and run with it.
I wouldn't move backwards to Pull-ups or diapers either - my husband also wanted to do that but I feel like it would have been giving her permission to use her pants to go both pee and poops in and that would be detrimental - she's been pee-accident-free since December. I'd have hated to lose that progress! (Also, she had been fine with her poops on the potty as well since Decmeber till around March or April or so, which is what was extremely frustrating to me. I knew she had the ABILITY to do it! Then we had a big regression, I think due to a constipation episode and that's when it all went haywire!)
So you are definitely not alone - and I know how frustrating it can be. Hang in there; I hope you can find something that works for you and your daughter!