I think most of us have had this problem. My DS was almost 4 before we finally conquered the pooping in the toilet thing. My DD fought it until she managed to do it at my mom's house. My mom made such a big deal out of it and gave her a box of puzzles she happened to have bought for one of the 8 grandchildren. When she got congratulated and given such a big gift for succeeding, it was smooth sailing from there on.
This is what I told a few friends of mine, and read in a parenting magazine when I was trying to train my DS. Kids see their poop as a part of their body and so to them they are flushing a body part down the toilet and it's a bit nerve racking. Once they understand that it's ok and what they should do it becomes easy. Unfortunately it takes a bit for them to understand that therefore it's harder to train them to poop in the toilet then pee. I know that sounds weird, but once I used that mentality with him and finally managed to make him understand that it was supposed to go into the toilet he started doing it on a regular basis. It wasn't easy to make him finally get it, so when I knew he had to poop but wouldn't go in the toilet I would give him a pull-up. It made it so he would at least go and not hold it in, and he wore undies the rest of the time. I think it's also one of the last things they have complete control over. The other problem is that they get afraid to do it in the toilet, so it builds up and gets hard and then it hurts to get it out. They begin to connect the 2 together and it becomes a mental block. Make sure she is getting enough fiber so it's easier to get out and you won't be as likely to have that as part of your issue.
Good luck. Try not to stress over it. She will get it! As my MIL always said no kid ever went to kindergarten in a diaper.