I think dogs experience emotions in a way that we can't truly understand - that is, until we can inhabit their bodies and then come back to tell about it
. That said, "revenge" would surprise me. A dog pooping from anxiety, being upset, fear - wouldn't surprise me. But, what can we know?
I for one, may try this "revenge pooping" myself. I shall keep you posted.