M.J.
We've dealt with encopresis for a few years now. Thankfully, knock on wood, we're pretty much over it with our six-year-old son. I'm assuming you've already tried the standard mineral oil, fiber additives treatment? That didn't solve anything for us. What DID work was a major bribe. We offered our son something ridiculous like $20 or a huge Lego set to poop the first time. He was scared since holding it results in those huge poops, but he did it for what he wanted. We found the big reward was essential to overcome the "It's going to hurt" mindset. It had to have the "wow" factor or he just wouldn't poop. Next, we made it routine. Every night, before bathtime, he poops. We continued with rewards at the beginning to encourage the routine, although nothing as big as the first time. Over time, it became routine and since he was going every day, they weren't painful and he lost the fear. Now, we've had instances where he will voluntarily go and poop on his own. HUGE progress.
Good luck! And don't blame yourself at all. It has nothing to do with potty training techniques. It's just a medical condition that some kids get.