Unfortunatley, a child only has control over a few things in his life and pooping is one of them. Here are a few things that might work, but again you may have already tried them....
If the problem is the toilet, have you tried a potty? maybe they can decorate it with stickers to make it thier own?
If the problem is the bathroom, have you tried taking the potty our of the bathroom, into the hallway? A reward system that's immediate? something that works for him? small cars, stickers, (try and stay away from food) when you see him going try rushing him to the potty and when it goes in do a special dance...I know it sounds silly, but the more praise they get for going there the better and then when they go in their underware they help clean it up ( between ages 3-5) and no reaction is given.
I hope this helps.
at 9:59 AM on Jul. 2, 2008