As you might know, we've refocused our efforts on understanding what makes for good documentation. One element of that will be extracting common patterns such as those you mention. In particular, good documentation highlights potential traps using a feature and gives actionable troubleshooting advice. It's entirely possible we'll end up with some warnings that need to be used a number of places.
That said, I think these sorts of templates should be avoided as long as possible. We've had experience with stock annotations and it seems generally a better idea to encourage people to use their own words rather then provide a template. Practically speaking, people tend to gloss over stock warnings rather than take notice if overused. (For instance, I no longer pay much attention to Wikipedia's citation needed template.) So instead of a button, you're probably better off using a bit of bold to get your point across:
Warning: This command permanently deletes history. If that's not what you want, try the safe version.
It's not that many keystrokes and you can effectively reuse the details with a simple link.
We will need to be a bit more explicit in our guidance about how to include gotchas in examples. It's always frustrating to find an outdated answer that's been accepted on Stack Overflow and is no longer best practice. Documentation's versions feature helps with that. Perhaps it would makesense to provide a generic version of The TeXbook's dangerous bend symbol:

safe version
,how?
, andwhy?
are right there and don’t take you away from the example.