> Banks go insolvent if they lend too much money out,
Banks don't go insolvent because they lend "too much" money out. They go insolvent because the collateral on those loans is less valuable than they estimated. E.g. the assets are lower than the liabilities. That is the only possible way that any business can go insolvent.
So when you take a loan on a house, the house is the asset the money lent is the liability. Housing prices drop enough, people walk away from the loan, the bank goes insolvent. That is true if it has a big balance sheet or a small balance sheet as these numbers just scale out.
> and then all customers demand their money back at once.
That is applicable to the era portrayed in the Mary Poppins movie, but not in a modern banking system. Even in the early twentieth century "bank runs" was something people would talk about when what was really going on was asset deterioration and breakdowns in the capital market.
But Hollywood preferred the more intuitive story and also the story in which the survival of the bank was in the hands of common people's choices rather than in the hands of the capital markets, where it truly lives. Thus you get It's a wonderful life where a stirring speech to not withdraw money can actually effect the P&L margin of a bank rather than the less exciting story of whether the bank's cost of funding exceeds its cost of borrowing.
Today banks borrow at a low rate and lend at a higher rate.
This includes borrowing whatever cash they need to meet outflows. In fact some banks don't even accept deposits at all, they just borrow from capital markets and don't even deal with depositors. Most big banks are depository institutions and tap both depositors and short term funding markets.
All that matters is that the interest received from inflows is less than the interest paid on borrowing to satisfy outflows. It is all about making money on that spread. When banks can no longer make money on the spread, they go insolvent even if no one makes a withdrawal. If banks are making money on the spread, then withdrawals are not a concern to the bank.