For anyone who thought the U.S. banking sector was healthy, Warren Buffett’s $5 billion investment in Bank of America should be a wake-up call.

Many investors assumed the Wall Street bailouts of Bank of America and the other big banks more or less healed the sector. All it took was few trillion dollars in liquidity and a few $100 billion in recapitalization. Voila!

In fact, the banking system was not saved. The massive injections of liquidity temporarily salved the day-to-day operations of banks, but they did not repair the more profound troubles. Indeed, pouring billions into nearly identical management teams that mismanaged risk, overleveraged exposure and drove banks off the cliff in the first place was an invitation for another crisis.

In past weeks, Bank of America has been under increasing pressure from investors. Its already damaged stock was cut in half, and commentators including myself argued that the bank was headed back toward the rocky shoals of insolvency.

On Thursday, Buffett stepped in, at least temporarily, to save Bank of America’s bacon. He was inspired, Archimedes-like, in the bathtub — an image I will likely carry with me for the rest of my days.

Buffett has put together a deal on terms similar to those he offered Goldman Sachs and General Electric: A fat 6 percent yield on preferred (not common) stock, and warrants to buy 700 million Bank of America shares at $7.14 each, good for 10 years.

A few items leapt out:

●Despite its repeated claims to the contrary, Bank of America needed both capital and a reputation reboot. Buffett provided a little of both, though I’m not sure which they needed more.

●With the Fed offering banks capital at nearly zero percent interest rates, why would BofA take money at 6 percent? This gives lie to the claim that BofA did not need more capital. (The counterargument is this was about the stock slide, not the capital structure, which remains opaque.)

●Investors are cautioned that unless you are buying on the same terms as the billionaire, you are making a very different bet than he is.

But all of this goes back to the failures of the 2008-09 bailouts. Consider what was actually done then, and you will understand why none of the underlying problems have been fixed:

Bank holdings: They remain stuffed with declining assets, primarily in housing and derivative holdings. Another leg down in housing could be nearly fatal.

Transparency: Balance sheets are unnecessarily opaque. Eliminating fair-value accounting via FASB 157 did not fix balance-sheet problems, but instead allowed banks to hide them.

Capitalization: This remains too thin. Leverage should be mandated back to the pre-2005 rule change of no more than 12 to 1. Management does not keep adequate capital unless forced to do so (“sufficient” capital reserves cuts into profits).

Misaligned incentives: Compensation and bonus schemes were not significantly changed after the bailouts, except during loan repayments. Thus, management and traders still have the same upside to roll the dice, but they do not have the downside risks, which remains on shareholders and taxpayers.

Imagine: What if we’d gone Swedish on banks like Citi and BofA — nationalize ’em, clean ’em up, spin them back out to the markets by placing them into a prepackaged reorganization (a polite phrase for bankruptcy). Here’s how that might have played out:

First, the easy stuff: Fire senior management. Not just the chief executive. Nearly the entire top floor at the bank, including the board of directors, is canned. Equity shareholders are wiped out. Whatever is left after all is said and done goes to the bondholders, typically, at 25 to 50 cents on the dollar. (In Sweden, bondholders got 100 cents on the krona, but that currency was significantly devalued. So the bondholders were not made whole; they lost 50 to 75 percent in real value.)

Temporary nationalization is the play: Uncle Sam provides debtor-in-possession financing to keep operating. All of the bad holdings, mortgages, derivatives and other liabilities are pulled out and auctioned off. This includes the bad real estate (REOs), the CDS/CDO book, defaulted mortgage obligations. Remember, there are no such thing as toxic assets, only toxic prices. At some valuation, these are worthwhile investments — just not 100 cents on the dollar. Let healthy buyers pay 15 to 30 cents. And anything that is worthless gets written down to zero.

Recapitalize the parent bank, and spin off each division: IPO Merrill Lynch for $20 billion. Spin out a clean Countrywide for maybe $8 billion. Sell off all the non-depository bank pieces.

What you have left is a well-capitalized bank, owned by taxpayers, with well-capitalized divisions as stand-alone companies. All of the above have transparent balance sheets. Eventually, everything gets IPO’d back to the public markets. Uncle Sam gets repaid, and whatever is left (if anything) goes to the bondholders.

You would have also created a transparent, unleveraged, adequately capitalized banking system that would be a contributing member of the U.S. economy, rather than zombie banks that don’t realize they are already dead.

But all that was a missed opportunity — for W and O alike. What we have instead is banking behemoths that apparently still require extraordinary intervention (a.k.a. life support). Many of these remain mortally wounded by holdings that would have been shed in any type of reorganization.

I suspect that the downturn in the sector is a credible bet that these banks are not in any condition to withstand a recession. If the banks come crawling back to Uncle Sam for another bailout, it will be proof that “rescuing” financial institutions that blow themselves up is the wrong strategy.

Real capitalists know failure is part of the process. We may well have another chance to fix the banking system. Let’s hope we do it right this time.

Ritholtz is chief executive of FusionIQ, a quantitative research firm. He is the author of “Bailout Nation” and runs a finance blog, The Big Picture.