C., I don't have any advice for you, but I wanted you to know there are other moms out there who are dealing with this. I am one of them. My son was 5 about two weeks ago and he is still not going poop in the potty regularly. He only goes about every 3 days and he will hold his poop until he can't hold it anymore and it starts to come out in his pants. He usually runs off to be alone when this happens. Once in a while I can I redirect him to the potty, but it's usually an argument or I don't catch him until it's too late.
We have had to give him enemas in the past because he has held it so long. Those take my husband and me to do, and my son and I usually end up in tears. On his pediatrician's recommendation we have given him Miralax. It works, but he can't hold the poop in very well even though he tries, so he ends up having messy pants 4 or 5 times a day. I stopped giving him Miralax b/c I could not handle all the mess.
As I said, I have no advice, I'm just waiting things out and knowing at some point, it's bound to get better. I've tried rewards, fussing at him, ignoring it, having him try to clean it up (what a nightmare!). The only thing that works is him making a decision himself to do it right, which he has done a few times. But even as I'm typing this, he is holding it and some has already come out in his pants today. He refuses to sit on the potty or let me change him. About the only thing I can do today is wait until there is something he really wants to do and tell him he can't do it until he takes care of this.
Good Luck to you and hang in there. I keep telling myself he won't be doing this in a year, but then again I was saying that a year ago.
P.S. Don't let yourself feel like a bad mom b/c your child wasn't trained when he was 2 or 3. I prefer to think of it as potty learning instead of potty training. It has to come from the child.