Sarcasm is not [always] wrong speech and is often a systematic shortcut for philosophical analysis. Sarcasm can be found among philosophical discourse such as when Socrates pleaded with Euthyphro to teach him what the latter knows (quite clearly making fun of the guy for the benefit of the audience) and Socratic irony could even be called the Socratic method, or philosophical method. And while not being as famous Buddha also loved to poke fun at people if he thought it a good teaching method.
There are many examples of satire by the Buddha in the Pali canon. For instance, in the Tevijja sutra (DN13), the Buddha compares the brahmans claiming to show the way to meet the Brahma without ever seeing him to a young man searching for the perfect girl, without seeing her or knowing her name and whereabouts.
Again, in the Assalayana sutra (MN93), the Buddha ridicules the claimed superiority of the brahmans by birth by saying that the “brahman-women are plainly seen having their periods, becoming pregnant, giving birth, and nursing [their children]. And yet the brahmans, being born through the birth canal, say, ‘Brahmans are the superior caste; any other caste is inferior.”
Again (MN90) the Buddha pokes fun at King Pasenadi Kosala and his servitude to the sisters Soma and Sakula.
Again (Majjhima Nikaya 35, Culasaccaka Sutta) a wanderer, Saccaka, threatens to take on the Buddha in debate and yet as you would expect Saccaka ends up thoroughly humiliated, seated and depressed (which turned out to be a necessary antidote for his pride and he ends up becoming an arahant).
As well as sarcasm and irony the sutras are full of lighthearted quips like when Buddha said (Anguttara Nikaya), “This is so important, I can’t even think of a simile for it” which considering how free the Buddha was with similes the listeners would certainly have taken this as a joke.”
Further, Buddha did not suffer fools and was not overly concerned with what we’d call today ‘snowflakes.’ For instance, The Buddha’s criticism of a monk who broke his vows is as follows:
“Worthless man, haven’t I taught the Dhamma in many ways for the fading of passion, the sobering of intoxication, the subduing of thirst, the destruction of attachment, the severing of the round, the ending of craving, dispassion, cessation, unbinding? Haven’t I in many ways advocated abandoning sensual pleasures, comprehending sensual perceptions, subduing sensual thirst, destroying sensual thoughts, calming sensual fevers? Worthless man, it would be better that your penis be stuck into the mouth of a poisonous snake than into a woman’s vagina. It would be better that your penis be stuck into the mouth of a black viper than into a woman’s vagina. It would be better that your penis be stuck into a pit of burning embers, blazing and glowing, than into a woman’s vagina. Why is that? For that reason, you would undergo death or death-like suffering, but you would not on that account, at the break-up of the body, after death, fall into deprivation, the bad destination, the abyss, hell…”