If he has no problem with pooping on himself it sounds as if he's not ready to train, he HAS to care or he won't stop. It seems he KNOWS he doesn't like poop against his skin anymore, which usually motivates them to do it on the potty. If he would wear a diaper you could require he sit on the potty to use it and eventually cut a hole in it for the poop to fall in the potty.
What about boxer briefs? They cover more and would catch it, yuk (sorry) but maybe he'd wear them. You could also put a diaper on him and overalls on backwards, we had to do this awhile prior to potty training because my guy kept getting undressed. Or, put him in a Little Swimmer in a warm bath, he may think the designs are cool and not fight you. But then he's still pooping on himself and not ready to train.
Basically he needs to sit on the potty or the toilet with a little seat more often and for longer periods of time. Get him a potty watch or potty timer that he wears and alerts him when it's time to sit, he then has the responsibility to do it, and you don't have to remind him. Because if he's just running around commando he IS going to poop wherever.
If he hollers, screams and cries when you put something on him that's a behavioral problem you need to discipline with a time-out to let him know it's not acceptable. I'd also stop going anywhere until he complies, no outside play, no stores, no visiting anyone, definitely not in public places like parks where he can poop in a sandbox, no anywhere, and tell him why.
My guy is 28 months and training bare-bottomed, we won't be using undies until he is good at knowing when he has to go and actually going, that will be his reward. He got bored with stickers after 5 days, Dum Dum pops after 3, and now just wants "high-fives" and praise. He went poop a couple of times on the potty then began to hold it for several days as well, not good, and then refused to sit. So we stopped training for a couple of weeks, just left the potty out, then began again. He started holding it again and his ped said the longer he holds it the harder it will be for him to poop (he'll be afraid of it hurting.)
So I A. loading him up on foods that make him have to go, watch him like a hawk and get him to the potty when he appears to be ready to go. After breakfast of whole grain cereal, milk and whole wheat toast I give him half a Fiber One bar, and some juice while he's on the potty. I can see it's working by the expression on his face and that's when he usually wants to get up, run and hide. So, I have to go get him and redirect him, back which usually makes him try to hold it. Then out come the Goldfish crackers, or Cheerios and water and watching for signs. (It takes a lot of parental involvement.) When he gets to the point where he HAS to go I give him LOTS of encouragement, "Good job, you can do it!" and if he gets up I let him wander or play until I see the "look" again or that he's starting to poop and pick him up and put him on the potty, encouraging and he will usually go because he's trying to listen to me and forgets to hold and lets go. He's ALWAYS proud of himself for doing it, is fascinated that the poop came out of him ; ) and it's getting much easier to get him to sit more often and for longer. He also sees me in the bathroom so knows this is what we do, modeling this may help your son. I got a couple of books written for kids about pooping on the potty, made up a song about it, and have shown him videos on YouTube of toddlers doing their business. (I screen them, I don't want him to see screaming toddlers refusing to poop.)
He pooped on the carpet once and was so proud of himself for pooping :-/ I didn't freak out but let him know how disappointed I was, that we do not poop on the floor but in the potty. I cleaned it up then gave him a wet paper towel to go over it so he could see we have to clean it up. He hasn't done it since.
Hope this helps ~ hang in there!