Question for autistic adults- toileting

Are there any posters that remember learning how to toilet independently? My son is 4 years old, verbal and smart, and really reluctant to poop on the potty. He's pretty ok with peeing, although if he's got underwear on he's likely to totally ignore if he needs to pee or not. He just goes in his pants. Ditto with poop, although he will hold it until he gets painfully constipated if we don't put him in a diaper. This just happened and was so traumatic I've completely backed off the whole concept for the moment.

 https://1921681001.id/ My question is, was anybody reading late to be "potty trained", and how might I avoid this being a horrible experience for him? He's definitely physically capable, it's the mental/emotional stuff. I read a lot but I still feel like I don't know what I'm doing, and I have limited help from his school (preschool for kids on the spectrum). I don't want his being in a diaper to limit him from fully socializing with other kids his age next year in kindergarten. https://19216811.cam/