cracking the whip
I think this is a fantastic example of what you’re talking about.
On its face, “cracking the whip” doesn’t need to be seen as offensive. Humans have collectively spent far more time using whip cracks to motivate animals than fellow humans, I suspect.
However, the determination of offensive speech is not in the hands of the speaker, but rather in the reception by the listener. That is to say, you can have the purest of intentions but if someone is offended by what you say, no amount of explaining takes away the initial offense. And generally you don’t GET to do that explaining. Damage is done, and that person may then avoid you or already have a shifted opinion of you.
I’ve had to learn this lesson the hard way. And fortunately have had friends who were willing to tell me that I had offended them when I thought what I said was completely benign.