My daughter has had similar issues, but she won't go in a diaper or a potty when it gets bad. After getting things super soft with Miralax she'll STILL try to hold it in and we go through lots of undies (I just keep a bucket of water with oxyclean in it in the laundry room to toss dirty stuff in and launder it ever other day when she goes through those spells.
One thought for your daughter might be to see if you can get her to poop into the diaper with it on the potty chair- instead of fastened onto her. Once she masters that (if you can convince her to do that) then maybe you can put the diaper into the bucket part of the potty seat, then move on to no diaper at all at her own pace. I know it sounds like a lot of work- but just thought it might be worth trying. You could even start with her trying to poop into a diaper next to the potty if that initial step is too scary for her. And in my opinion always reward each success, never punish (last thing you need is a child terrified to poop, afraid to tell you she had an accident... etc- that creates so many more issues).
Something that has helped my child is I give her Fiber gummy treats (sold at Target brand name Pedialax) and I cut back on cheeses (Kroger sells a good Veggie Slices that tastes like american cheese that my daughter adores in grilled cheese sandwhiches). Unfortunatly her favorite treat is cottage cheese, so I usually use that as a reward for pooping in the potty. I avoid the miralax whenever I can, but that is beter than resorting to the enema or supossitories. Best of luck- this is a tough issue, but you aren't alone!
PS- rasberries dipped in a bit of splenda are a terrific high fiber treat taht speeds the process along- and allowing apple juice to drink can help too (I buy the light Calcium fortified type).