If your child is struggling with using the potty, having frequent accidents, holding poop, or very stressed, you may have moved to underwear too soon. If you think it was too soon and after a week or two it hasn't improved, we recommend telling your child, "It seems like pooping in the potty is really hard for you. Do you want to go back to wearing diapers and try the underwear again when you feel more comfortable pooping in the potty?" Ask at a time that is not stressful. If he says he would prefer diapers then put all the underwear away. When he starts asking for it (which he will) then tell him, "Remember how tricky it was to put all your poops in the potty? We can get your underwear back out when you are using the potty instead of your diaper for poop." If he says he wants to wear underwear, then let him know that you are here to help him figure that out, but wearing underwear means that it's his responsibility to be sure the poop goes in the potty, so he needs a plan for what might help him poop in the potty.
"Though going back into diapers seems like moving backward and can be frustrating to us, it's likely the most peaceful path. Just this afternoon while looking for something else I found this quote. “Learning to use the toilet is a process that takes time. Rather than push or manipulate your child by giving him treats such as candy or a special reward for something that he will learn to do on his own, trust that he will learn when he is ready. Respect is based on trust.” – Magda Gerber.