The government can insure them.
What is your favorite idea?
How about the banks insure their own deposits?
I buy fire insurance on my house, paid for out of my own revenue.
Banks can buy insurance, paid for out of their own revenue (the split between what they pay for deposits and what they collect on loans).
If the bank doesn’t loan speculatively, that insurance premium should be fairly minor.