The psychologist Michael Bader recently wrote a rather nice book that touches on this subject, called Arousal: The Secret Logic of Sexual Fantasies.
His analysis of masochism (among many other things) is that it helps the masochist feel safe in a way that allows their desire freedom to be expressed.
Bader points out that these are brilliant solutions to the problems posed by pathological beliefs ("I might hurt my partner unless I control myself", or "I must reserve all my attention for my partner and not myself", ...). In therapeutic contexts, helping people understand these reasons for their desires makes them less guilty, and able to think of their particular desire as simply something any reasonable person would enjoy, given their psychological makeup.
A classic book on failures is Levy & Salvadori's Why Buildings Fall Down: How Structures Fail (ca 1992).
They review a variety of bridges, buildings, dams and other objects with exciting failure modes. Remarkably, they manage to be respectful of the regrettable loss of life while also being kind of funny. For example, the classic film of the failure of the Tacoma Narrows bridge shown to physics undergrads is hilarious when you watch Professor Whatsisname walk down the nodal line; it's somewhat less funny when you realize the degree of danger to his life.
An architect friend once claimed to me that under Hammurabic law, if a building fell down and killed somebody, the architect was killed too -- and that this led to modern architecture firms being partnerships instead of corporations, with personal liability for the architect when he puts his seal on plans. Another friend, whose credibility I know less about, asserted that in Roman times when building an arch the engineer was required to stand underneath it as the construction scaffolding and trusses were removed.
I can't verify the stories, and don't approve of the brutality involved in any case. But a high degree of personal involvement with the consequences of failure does perhaps inspire some degree of meticulousness, and perhaps solicitation of peer review. ("Hey, Fred! I gotta stand under this bridge. Does it look right to you?")