My very bright 3.5 year old has been potty training for over a year--it's not that he doesn't get it (he got the pooping pretty quickly within a month) but it's about control. He's very spirited, and earlier this year he regressed to pooping in his pants. He'll be great all day at daycare, but lately right after dinner before we go up to do bath and bedtime he'll poop in his underwear. When asked why, he'll reply loudly, "because I WANT to." Nothing we do seems to make a dent--not ignoring it, or getting upset, or taking away toys, or using toys/movies as an incentive for pooping in the potty. Nothing. He does it to get a reaction (mostly out of me). We're at a loss. In my head I term it "hate pooping" (like you hear cats do in their owners' shoes when they're feeling ignored). This seems independent of how much we play together after he gets home from school. If he's playing by himself, he'll poop (even when I ask him to use the potty beforehand). But when he's in the mood, he'll run to the potty by himself to poop, unasked. There's not a real rhyme or reason to it.
He's in undies during the day (except naptime when at school) and pullups at night. He's never had a dry night.