I don't have the answer, but I can tell you that we have had the same issue with my son who will be six this year. He is a twin, a preemie, and has always had constipation issues, so his pediatrician put him on miralax. We feared that it hurt when he went so that would take the fear away from going. The miralax helped, but didn't solve the problem... neither did the multiple Dr. appt's, screaming, crying (and I'm talking me - not him!) making him clean himself up, making him stay on the potty, rewards... just don't do it. In our situation, the more we brought attention to it (good or bad) the worse the problem became. My son is also not delayed developmentally but does have some sensory issues.
We thought we had conquered the problem, when his pedi suggested that we give him miralax at dinner, and then before he left for school he had to go potty or wear a pull up. We were floored when it started working, but he would not go to the bathroom for me, my husband had to make a game out of racing to the bathroom. You can only begin to imagine my frustration! But, bc it was working, I began to wean him off the miralax, and the problem came back again. After another trip to the pedi, she told me to NOT take him off again, that it is natural so it won't hurt him, and this is a time issue... "he won't be going off to college with this problem". NOT comforting I know!
For the last 2 years, J has been attending a private pre-school which required him to be potty trained as well. However, J would hold it in until the end of the day, and it was never a full accident so most of the time no one even knew. BUT, because he is a boy, has a late birthday and was a micro-preemie, we decided it would be best to hold him back a year. He will be six in 3 weeks, and although we haven't conquered this problem completely, it is slowly getting better. He will start kindergarten this fall at the same private school. It is not our expectation of the teacher to solve this, but as far as maturity is concerned, he is ready to start school.
At our last appt, the pedi suggested "play therapy" as did my son's neurologist for this same issue. We have not tried it, as financially it is not an option for us, but may be for you.
The craziest part of this is that we never had to work at getting him to pee in the potty. He pretty much did that himself. Never has accidents, and never wets the bed. His twin doesn't have any of these issues, but does soak the bed at night (that's another post)
Sorry, that I can't solve the problem, but hopefully shed a little light on the situation. Best of luck!