Following bc I’m in the same-ish boat….having potty time issues too.
My cousin took her daughter to a child psychologist to help with this issue and it worked.
You might try reading this book with them (I'm sure there are others, too) I Can't, I Won't, No Way!: A Book For Children Who Refuse to Poop https://a.co/d/1rbz5lH Also, could they be constipated? You can try adjusting what they eat to make the poop softer, it should help it feel less scary. We found another book, It Hurts When I Poop, to be really helpful in helping my daughter understand what's going on.
Hat kind of toilet are you putting him on? Maybe get him something else? Have you tried reading to him? Maybe do like little toilet dances to help get the gut moving along?
This is super common! I've heard to give them a drink with a straw and let them blow bubbles, I can't remember the science behind it but it helps relax those muscles or something!