I have a student in one of my training classes that we think is defecating to guard/claim a room in her house. It is a three year old GSD mix. It was very fearful of people and barked and lunged at strangers when they first got it at one year old. We've worked through that and she's great, won't bark or lunge is completely calm around people from outside and people that enter the house.
But when her son's friends come over, the kids all play in one particular room. After they leave, the dog goes in there and poops on the floor. It's only after the kids have played there and it is always immediately after they leave. She has tried kenneling her for a while after they leave and the dog just goes and poops after she gets out of the kennel. She has tried putting the dog on lead and taking it out to go to the bathroom immediately after the kids leave, and she may pee but she will always hold enough to go poop in the room once she gets back in.
It seems pretty obvious that it is some sort of reaction to the strange kids being in the room and possibly some sort of marking/guarding behavior, but we are trying to figure out the best way to break it. I have a couple ideas, but I'm trying to get some fresh thoughts on the problem. Any suggestions from anyone?