As someone who gets paid to do standup comedy, this is not a basic rule of comedy.
I get that it's not appropriate to punch down (especially in the work place). It is always riskier to punch down with comedy but it is 100% not a rule of comedy not to punch down.