When there is a big power differential, you cannot make such comments in a non-toxic way. What you're describing is banter among friends, and even there you can easily miss the mark. But in a professional context when the person throwing around insults has the power to fire the people targeted, that is always toxic.
> in a professional context when the person throwing around insults has the power to fire the people targeted, that is always toxic
Not true at all. If I messed up, and I fear I am about to be fired, I would be relieved if my boss instead says "I'd like to rip your arms off and beat you to death with it. Now get back to work."
Context matters!