@hizbaby if you figure this out, please do tell. My pup, 10 weeks, does this and I am certain it is vengeful. It started with crate training. When we'd put her in the crate she'd throw a fit. If we left her be, she would eventually get super hysterical and then just poop in the crate.
My wife would then make me take her out to clean the crate. I wondered if she started to learn that pooping resulted in getting her out of the crate - therefore - pooping = attention and time away from crate. So we got a pen and left the door to the crate open, this resulted in her moving her poop from the crate to the pen when angry we didn't let her out.
Now, she's having trouble with the biting feet thing and we've been working through this. One of the solutions we've read, is the that you give her a time out. Well, we've also read that you shouldn't put a B in a crate as a form of punishment, because they will associate bad times with the crate and hate it more. So to have a "time out" place, I took all the possibly dangerous things out of the half bath we have downstairs and started using it as the time out place.
This is today. Three times I asked her to stop nipping at people's feet. Three times she ignored me. So I picked her up, put her in the half bath and closed the door. She's throw a fit and I'd let her out when she calmed down. On the fourth time, I opened the door and low and behold poop in the corner. I let her out, cleaned it up, and put her back for another time out.
Thankfully, this time she seems to be behaving. But there is no doubt in my mind now, that she does this when she's displeased.