FORTUNE — You may be one of those who like the mental image of sitting in the sun in some far-flung location with a drink that’s under the same kind of umbrella you are, laconically perusing a big fat book on a dead president and lots of the same in your wallet. Not me. I want to be one of those guys who 30 years from now say, “Gah!” and keel over with a look of surprise on their face and the bit between their teeth. So naturally I’m thinking about how to preserve my size and power as I reach the age when I really should be taken out and shot. I think I’ve ascertained the key strategy: You have to avoid doing stuff that’s going to get you fired the wrong way. To that end, let’s look at just a very few historic fubars and see what lessons may be learned.
Nero burns Rome to improve the value of his real estate holdings. Immediate consequences: zero (for Nero). Lesson learned: It’s good to own the business if you’re going to do crazy things. Conclusion: Don’t engage in criminal activity unless you own the business.
Secret Service agents visit hookers in Colombia and get caught when stupid dude stiffs the service provider. Immediate consequences: dire, both personally and professionally. Lesson learned: Pay the service provider, moron! Conclusion: Nothing you do anywhere stays there.
Tiger Woods runs into the business end of a golf club brandished by his wife. Immediate consequence: Woods is fired from pro golf for a period not to exceed the attention span of the media. Lesson learned: Don’t engage in behavior not consistent with a credible corporate image, unless such behavior is integral to your brand, like Donald Trump.
News Corp. International (NWSA) is found to have hacked into the cellphones of athletes, politicians, and a murder victim. Immediate consequence: Middle management is decimated. Lesson learned: In a crisis, middle management is the first to go, so get out of middle management! Quick! Conclusion: If you have stock and options, cash in regularly.
Relatively new Yahoo (YHOO) guy is stripped of his stripes and tossed overboard by perpetually flailing company after his résumé is discovered to have been (cough) amplified. Immediate consequence: inelegant defenestration with extreme prejudice. Lesson learned: Being easy to fire makes you fireable. Had the company been doing better, it would have at least taken a few minutes to cook up a cover story. Conclusion: Be harder to fire.
At J.P. Morgan Chase (JPM), CEO Jamie Dimon is called upon to explain a loss of $2 billion. Immediate consequence: none so far, aside from the kind of mild discomfort one would experience from a nasty dog bite. Lesson learned: If you’re going to fail, do so at a very high level, and with some flair. Other lessons: (1) Always look your best in distress. Dimon has the best hair in all of banking, and uses it to good effect. (2) Raise your profile when others would be shrinking theirs: At this point the beleaguered executive is as ubiquitous as Justin Bieber. (3) Never lose your message track. While in the midst of the greatest apology tour since Hugh Grant, Dimon has never retreated from his core assumption of what a bank should be allowed to do — i.e., bet for profit with your deposits. He is sincerely sorry about that lost money, though.
Ultimate conclusion: The great ones fail up. In my business, there’s a guy I will not name because one day we may have to smile at the same photo op. He quite literally destroyed the company of which he was the steward. Yet this famous loser is being considered for CEO at a big firm. He may not get this top slot. But one day he will surface — and not in middle management either. With boldness, craft, and utter lack of shame, he has leveraged disaster into a launch pad. In short, he has made himself too big to fail. Now that’s what I call a retirement strategy.
Follow Stanley Bing at stanleybing.com and on Twitter at @thebingblog.
This story is from the July 12, 2012 issue of Fortune.