Self protection can be a good thing.
Except when it's not.
When my older son was a toddler and experienced frustration or anger while playing with another kid, he would sometimes turn around and whack me. As his primary interface with the world, I was also the place he chose to deal with his negative feelings. Not always pleasant for me, but definitely part of the parenting job description...and also better that he should whack me than whack another child.
12 years and another child later, fortunately no one is hitting me because a toddler took away a toy. However, both kids do still tend to verbally vent their frustrations in my direction. While they are now in my weight class, they're still at a pretty young age when it comes to emotional management. In the throes of intense frustration, they are more than willing to tell me I am the worst mother in the world and that they are going to call Child Protective Services to report me.
Of course one does not take things personally and express irritation at such comments when one is a responsible, mature, parent person....
Nonetheless, it is sometimes hard to not to get a little stressed, while assisting the stressed child to process his negative emotions.
Protecting oneself from some of the wear and tear while still being open and available to parent is...well, maybe an art and a science.