G.,
My heart goes out to you; we are going through EXACTLY the same thing!! My best advice is just hang in there! My youngest is still working at it as well and one thing you can try is a reward system. I have assurances from a psychiatrist that it is NOT bribery if you only give the reward AFTER the successful behavior. :}
Here's what we're doing. My youngest LOVES chocolate so if he goes poop in the potty, he immediately gets an M&M. Then, he also gets a sticker on a special chart we made for our trip to Disney (all decorated with letters and Mickey stuff) that he can use to buy something special at MK. Each sticker is worth 25 cents.
So I suggest, gives sweets or something he likes for immediate gratification and then if there's a special toy or "big thing" your little man likes, promise him can have it when he "earns" enough stickers (cut the picture out of a catalog) and post it on a chart near the bathroom. Then he has a visual display of what he's done and what he's trying to reach (we all know men are visual creatures, lol!). Our OT told us this will help him to "see" why he should pay attention and do what you're asking. :}
Hope you like the plan, and also one thing I can share, I've found my little one often pees while he's trying to hold in the poop. It's like he can only focus on one at a time and the pee just leaks out. Sorry, too much info, but that may help with the frustration. :}
Good luck and hang in there!!
S.