Yes. Some would say, it’s almost like using the spirit of the rules ;)
In all seriousness, your theoretical example of why code of conduct can be harmful to a community has nothing to do with the code of conduct. It sounds like it’s just an unhealthy community with unhealthy moderators. Remove the code of conduct and the same scenario would play out. The only difference would be members crying out about how one member was banned for such a reason and another member who did the same thing wasn’t banned.
And lastly, in my community at least, it doesn’t come down to personal judgment. Unless a user is spamming or spewing racial slurs, the moderators meet and discuss whether or not the behavior of the user is ban-worthy, temp ban-worthy, or inconsequential (in the former case, the moderator who notices such abrasive action can take immediate action). This way we can at least remove some level of bias by ensuring that there’s consensus.
Who knows, my community might just be small enough and inactive enough that I haven’t run into the flaws of the code of conduct. This is all off topic anyways though, so I’ll leave it at that.