We know humans are animals, and as far as we can tell, toilet humor is universal across cultures. Animals aren't as intelligent as humans, sure--but does anyone think that poop jokes require a lot of intelligence to get?
I feel like the history of studying animal cognition can be thought of as long process of us just getting over how special and unique we think we are. First it was problem-solving vs. pre-programmed instincts, then it was "man, the tool user", then it was language, and now sense of humor? Well why not?
* 'we think' as in various pop-sci articles, so obviously apply your necessary skepticism filters.
Anyway, it's impressive that the bird managed to connect so many dots correctly and creatively play an inter-species conflict.