@soundsighted,
He really needs to be seen by a doctor. Sometimes other things are at play, there could be trouble between the parents, or parents are spineless when it comes to teaching him how to adapt. He may see this as a way to exert power (I know that sounds nuts, but maybe that's the only thing he can do to successfully control his mother or father). He could be high functioning autistic or he has a terrible diet. I love my sister-in-law but she allowed her oldest to eat only peanut butter sandwiches, hot dogs and chicken nuggets. Mainly because he could outlast her by being stubborn. I always figured if they get hungry enough they will eat what you give them. He also wore diapers until he was 5 and put up a fight every time his diaper was changed. He may be dealing with aspbergers, but not like "rain man". My brother left his family when the oldest was 7 and the younger was 4, he was pretty hands off helping raise the older children. First wife moved to Texas, brother remarried, had twin boy and girl with second wife and both the 11 year olds are a mess. I keep in touch with SIL in Texas, nephews come to visit every so often even though they have completely broken ties with their Dad. (Very long story). Remarkably, SIL managed to be more successful with the boys when my brother was out of the picture than when he was around.
I've taken the long winded way to say, this child's problem could be a reaction to any number of things and also could be a medical condition called encopresis. I hope your family finds a solution for a very difficult problem. I encourage you to be patient and supportive. This child deserves a even playing field. I truly wish you well.