I have to say we're dealing with this as well with my almost 4 year old son (he'll be 4 next month). He's had #1 pretty much down for about the past 6 months with an occasional accident during the day, but he can sleep through the night in big boy underpants and hasn't had an accident yet. Poop, however, is a completely different story. He will not poop in the potty. He poops in his underpants all the time. It's so frustrating! My daughter was potty trained before the age of 3 and never had issues with pooping in the potty. I try to put my son on the potty when I think he needs to go, but he won't go. A very short time later (5 minutes to an hour), however, he poops in his underwear. I was contemplating asking about this here on mamasource as well, so I'm glad you posed the question. I'm looking forward to seeing everyone's responses and hopefully can get some good suggestions. :-)
UPDATE - I took my kids to the doctor this past week to get their annual physicals. I asked the doctor about the problems we are having with getting my 4 year old to go poop in the potty. He suggested it is a "deep seeded psychological issue" that some kids have and to not try to force it. He said if you try to force it, sometimes the kids try to hold it in and then it gets impacted and you have to take them to the doctor to "dig it out," as he put it (sorry to be so graphic). He said it's probably just better to let him poop in his pants and eventually he will start going in the potty. He warned me there are some kids who still do this in kindergarten, but that we could address it further if it's still a problem over the next several months. My son is a November baby so he won't be starting kindergarten until he is almost 6 so we have a while left to get him fully trained before school, thank goodness! Obviously, I hope he's trained well before then, but I'm going to try to let go of this struggle for now and let nature take it's course while encouraging him along the way. :-)