You seem to assume that all risk is meant to be carried by the banks. As you note, such a thing is possible (up to the risk-bearing capacity of any given bank), but such banks would be very expensive. Consequently, most customers bank with riskier institutions and this places more of the risk back onto them.
So, in actual fact, this is the market doing what it does pretty well: solving a hyper-distributed problem with heterogenous agents with numerous complex, incompatible preferences.
Sometimes we don't like the outcome. That doesn't mean that the market has "failed"; it just means that we don't like the outcome.