Before he can get over his poop-phobia, the constipation issues have to be cleared up. Every single day, he has to be eating and drinking foods that will make his stools soft and frequent. If he continues to need meds, too, so be it. Until this is no longer a source of anxiety for him, let him go in a Pull-Up. Once he can relax and know that pooping isn't going to be painful, move him over to the toilet.
A couple of tablespoons of flax seed is an incredible source of fiber. It bakes well in breads and muffins, and can be sprinkled on yogurt, cereal, or ice cream.
I would also look into if his bottom is sore and he needs some meds to clear it up. Sometimes, the rectum can get tears from big/hard B.M.s, and there are suppository medicines out there to help heal the area. If his bottom is sore, it's going to be painful for a long time, without meds.
IMHO, if pooping is still problematic come fall, well, he's not ready for preschool, then. So many people post on here because their 3 y.o. isn't completely potty trained, and they have to be in order to go to preschool to join some activity. If they're not ready, they're not ready.