The problem is only when someone with power punches down, unlike a professional comedian (who has no power over the group s/he's punching at). That's fine, we can all laugh at ourselves.
There's also a problem with punching down when you're not a professional comedian, because now nobody knows you're joking. If you try this, you'll sound racist/classist/sexist/elitist.
The rules about comedy don't apply to professional comedians, because you know if they break them they're still trying to funny. Just like if a beginner plays a bad note on a piano, it's a novice mistake, but if a master does it it's dissonance that shakes your soul.