For starters, don't give contractors projects so large they're an existential threat to the company. Northrop Grumman makes billions in profit every year, and the JWST has been in the works since 2003. They (and their insurance) could afford to pay for the fuckups.
When a bank collapses, the FDIC steps in, takes over operations, and ensures it keeps running while they find a different bank to take it over.
It's a rather fascinating process: https://www.npr.org/templates/story/story.php?storyId=102384...