I think, in that example, the bank wouldn't loan the money in the first place. This sounds like a cheat, but banks do this every day; if you ask for money and their analysis concludes that its unlikely they'll get it back, they're not going to loan it out.
But, reality isn't as simple as that example.
The biggest thing that's missing there is Collateral. Lending isn't about just dollars; a bank is happy to loan you $100k if you've got $100k, or even say $50k, in assets to write on there. Because if you declare bankruptcy they can send their goons to your house and take everything you own.
Another way to think about collateral could be something like "intrinsic productivity"; its the things you own due to your own work and brain, not because a bank bought it for you. Everyone has something like this. Even back in 1200 BC, you were cutting down forests (with your hands) using an axe (which you built) to make a farm (which you run). That's collateral; it has value because human nature gives it value, not because it has a dollar sign attached to it. The bank can recognize that and assign a dollar sign to it. Hell, in civilizations past, you could be collateral; if you default, you get sold into slavery.
Another more minor thing that's missing is that the number of dollars in the world isn't a zero sum game. The fed is constantly printing more dollars. That's a job of a central bank. And its not just to replace bad ripped up dollars; they often increase the total amount of dollars in the world.
When they want to put more money out there, the Fed buys assets from the public using money that didn't even exist before the purchase. That right there is the power of the Central Bank. Normally this takes the form of buying Treasury Bonds back from the public, but I don't want to get too deep into the weeds of "where did these bonds come from in the first place"; conceptually they can buy any asset, and because the money they just bought it with didn't exist until right now, they've added dollars to the system without impacting the "net value" of goods in the world. Then in the future, if they feel there are too many dollars, they can sell those assets back to the public.