My daughter did the same thing. She is now almost 6 years old and suddenly decided it is OK to "poop" in the potty. We tried EVERYTHING. We used a chart system, points, bribes, punishments (not for going "poop" in her panties, but for not saying something as soon as she did it. She would sit in it until someone noticed.) We took her to the doctor who gave her the "if you don't get cleaned up right away, you will get very sick" speach. They gave her a laxitive because she had gotten so backed up. She took that for months. Finally one day she came to me and said "I went "poop" in the potty." I was thrilled. I praised her so much. And really let her know how proud of her I was.
He may just not be ready, and sadly you cannot rush it. Or it could be that he has had a tramatic experience with going "poop" in the potty. When my son was 4 he all of a sudden quit using the potty for "poop". I thought something was really wrong as he had been potty trained for 2 full years. I took him to the doctor who said it sounded like he had had a bad experience somehow and was "holding it in" until his body could not "hold it" anymore. I left thinking "what could have happened?" Come to realize, a few weeks before he started having accidents, we had been camping and a GIANT SPIDER climbed out of the "out house potty." Yep, that did it. I reassured him that this would not happen at home and helped to create a comfortable atmosphere in the bathroom for him and in less than a week, he was all better.
My recomendation is that at least once a day, take your son into the bathroom and have him sit on the potty (with a stool under his feet if he uses the big toilet) and read him a story. There is a great book called "Everyone Poops" You can pick it up at the library or a bookstore. It is a very cute story to help kids understand that it is perfectly normal to go "poop" in the potty. My daughter eventually became more comfortable with the potty and I think that is what finally led to her using it. The biggest thing is for you to stay calm when he has accidents, also with my daughter I had her take most of the responsibility for cleaning up her messes. I would make her take off her pants and panties and wipe as best she could, then I would finish the job. It takes time and patience, but eventually he will decide it is much easier to use the potty. Good luck and I hope this helps.