Dear T.,
We just "finished" the same exact issue with my son (who will be 5 next month!!). What we did after all else failed (bribes, rewards, punishments, etc) was to make him clean himself up. We stopped telling him to use the potty. We stopped asking if he had to go. We stopped talking about using the toilet at all.
One night I said to him: You are too big for diapers now, and Mommy and Daddy are not going to clean you up any more when you have accidents. We know that you can change your clothes and wipe your own bottom, so starting tomorrow, that's how it is going to be." So the next day, he was in underwear (this was just after Thanksgiving). Of course, as usual, he pooped his pants. So I said "Oh, the wipes are on the bathroom counter. Put your dirty clothes in the laundry." He threw a major tantrum saying he couldn't do it and that it was my job. I told him I would start a bath for him if he preferred, but it was his job to clean himself up. He did that for a few days (throwing a fit every time), and then, mostly calmed down about it. He still didn't want to stop what he was doing. Sometimes I actually picked him up and put him in the bathroom with the wipes. My husband did the same. It was SOOO frustrating. Then, at the beginning of this month, he had a chance to go back to preschool (I had pulled him out because he just wasn't using the toilet for poops). I told him we were going to let him try it again, but he needed to use the toilet for poops. And my husband told him that if he really couldn't feel the poops coming out he would need to go to the doctor (we knew nothing was wrong because when naked, he always made it to the toilet).
I don't know if he was tired of cleaning himself, eager for preschool, or scared of the doctor, but he has been nearly three weeks of using the toilet now, with very few accidents (and only one poopy accident- and that was today). We are not totally out of the woods, but it is such an improvement.
I had been "training' him since he was 2 1/2: and he was very consistent when naked, so I knew it was not a physical problem, but rather a power play. I also asked for suggestions on this site and learned that I was FAR from the only one who's child wouldn't poop in the potty. Crazy kid! Anyway, now he makes a big deal to tell us he's pooped or peed, and the "big" thing now is to remind him to flush.
Best wishes to you!
P.S. We kept a bucket by the toilet for his poopy underwear that he had washed out in the toilet, and told him not to flush the toilet until the underwear was in the bucket. The first couple of times he thought swishing the water was fun (so you are warned), but he soon got sick of it and tried to do it as quickly as possible.