My first thought was to avoid direct negative orders, to give a clear warning or alarm message to get attention, and tell them the exact danger.
Coffee is scalding hot!
... and put it in their hands.
Drink at your own risk!
Then I thought maybe giving them an alternative action would be a little better.
Drink with caution!
Or if necessary, really drive home what is going to happen if they don't heed the warning.
Drink with caution or RISK INJURY!
Then I found this article I think you'll find interesting. I did and I'm not familiar with the field haha. Goes into the factors that impact whether people will listen and respond to your attempt to have them avoid unintentional action.
1. Cost of Compliance: your target has a goal. You aim to get them to comply with a different aim that may directly prevent or delay their desire. Make the cost low for them provide an alternative (add one of those monopoly tags to the cup to distract them momentarily and cool the coffee), reduce any extra effort (make sure the font is big enough that vision-impaired don't have to find their glasses to read their coffee).
[Note here: by saying "no" or "don't" (drink this delicious coffee right now) is a direct order AGAINST their only current goal. This makes compliance real low. So I think avoiding those negative command words is a good choice in certain situations that don't cross into legal or life-and-death situations. ]
2. Danger Perception: sloppy or hard-to-read print communicates lower danger, avoid the familiarization effect (we see "caution" everywhere, so it becomes background noise and doesn't register). One way to combat that is hangs up the design color, wording, etc somewhat regularly.
3. Decision Making: the article hits on risk-taking and social factors. One interesting mention is "Partial Compliance," where the person gets over the first hurdle (sees and understands accurately that something is extremely dangerous. But then he tries to mitigate the risk by performing the action in a way he deems "safe." In my dumb example, he might take the lid off and blow briefly, then take a sip and burn his lip. In the real world, it leads to pool diving accidents and car vs train tragedies.