In that situation, if wearing a pull-up would result in him pooping as needed instead of holding it, I would let him wear a pull-up but only when he actually has to go poop. So I'd have him wear underwear and pee in the potty as normal. If he has to poop, put a pull-up on him and let him do his business, then take the pull-up off. If you put the pull-up on and he doesn't go in a reasonable amount of time, take the pull-up off and suggest he try again later. You would have to explain that he can go in a pull-up but he has to let you know when he has to go.
I had one that would withhold and it would end up being very painful for him to go. So I started with letting him tell me when he had to go, we'd put a pull-up on, he'd go, we'd clean him up, and put him back in underwear. Then, once that was mastered, we put the pull-up on and had him stay in the bathroom to go so he learned that's where we go poop. Then we switched back to going on the potty. We were going to switch to having him sit on the potty in the pull-up, but he didn't need that step. You can also cut a hole in the pull-up if he is on the toilet so the poop falls through. I didn't mind resorting to a pull-up for this as it still taught him to recognize the signs of when he had to go....it was just in a wearable potty (pull-up) instead of the toilet. Plus there was less stress and he didn't have withholding issues.
During this time, we let him see us poop and let him flush so the fear factor was diminished. We also discussed how it was normal and all that. I think at some point we even said there was a poop party going on in the toilet to try to lighten it up. And I would talk about how much less messy and quicker it would be if he went in the potty, particularly when I was cleaning him up. We didn't get angry or anything....we just kept repeating it in a calm manner. For example, "When you go poop on the potty, this will be a lot faster and you can get back to playing sooner."
We did do rewards too. He got a little toy and a big star on his potty training star chart if we went on the potty. (He only got little stars for pee on his potty chart.) When he went poop X number of times in a row in the potty, he got a bigger reward gift and then we stopped doing the poop reward gifts.
This strategy worked for us. It takes longer to be really done, but it was less stress for both him and us, and less mess overall. He hasn't had one poop accident in his underwear once we transitioned him to pooping on the potty.
Note however, if the child regresses to asking for a pull-up and then just going pee instead of peeing in the potty, then using pull-ups for just pooping won't work. We didn't have any regression with peeing so it worked well for us.