A psychologist from the school district said sometimes the only way is with mini M&Ms. It worked!
I found a tiktok that helped so much. We took our son every 15 minutes for the first day. Set a timer her knew when the timer went off he had to go try, if he went her got a. MnM if not he had to try again in 10 minutes. The first day we had 3 accidents, the second day none at all and by the 3 and 4th day we faded the timer and set is for 30 to 40 minutes. He was trained in 3 days. We've gone through a few regressions but he gets back within a day or so. This was back in January. He just started taking himself to go poop. I would have to catch him actively trying to hold it or poop in his undies.
Check out the book Oh Crap Potty Training
A sticker chart and training panties helped my daughter a lot. Pooping in real underwear is a lot worse then a diaper