The case of the Porsche Carrera GT is the best example of how to take advantage of a totally catastrophic situation.
Let's put in some background. In 1991, Porsche developed an F1 V12 engine for the Footwork Arrows team. However, the project was as problematic as it was ephemeral: design problems, breaks, bad results... and the team switched to a Cosworth motor for the seventh race of the year.
The good news? On that basis, Porsche began to create a V10 engine for the following season, but it was never used in F1. Instead, it was used in Le Mans at the end of the 90s, and in a street car, which arrived in 2004: the Carrera GT.