I recently posted a similar cry for help! My 3 year old is doing great with potty training, but poopy training is a no go. In fact, the more we pushed the poppy training, he started having potty accidents as well. Also, he would wait until we were out of the room to poop in his pants, or wait until he was somewhere else. Awful! My SIL suggested a book called "Mommy, I Have to go Potty." It has several suggestions for how to handle situtations like this, as well as helping you understand the whole process of training. What has helped somewhat is that we took all pressure off our son to poop in the potty. We told him to ask us for a diaper when he needed to go. And someday he would poop in the potty. This actually has worked! We rarely have an accident in his underwear now. And he does not hide that he needs to go. The next part of the suggestion from the book is where we're having trouble. She suggests that after they start asking for the diaper, then you ask them to go poop in the bathroom. Then sit on the toilet. And finally, when they are ready she said they will take their diaper off themselves. At first our son did agree to go into the bathroom. But after a few times of that he is resisting. So now I am stuck! But not having a mess to clean up in his underwear is awesome!
There is also another suggestion...something about calmly and quickly cleaning them up, with no attention at all. No talking, etc. After a while of this, put them in the bathtub and tell them that they can go poop in their pants, but that it is their responsibility to clean themselves up. Do this even with a large protest. Let them do most of the work, and then of course finish off the job. Early on, before I had read the book, I had tried this with my son and he pretty much made as awful mess and could have cared less. So I don't know. I was not real calm at the time though...and he probably was getting my negative attention.
What also helped me is she talked about more than just the physical readiness of training. My son honestly seems scared or overwhelmed with the sensation of pooping. I think emotionally he just is not ready. Someday something will click, just like it did with potty.
Good luck, hang in there, and e-mail me if you need more support!