If account has insufficient funds to do a reversal the bank is not always obliged to step in, only in a few specific circumstances. Avoiding such circumstances is possible.
There's an example in the article. If the account is owned by a company and it goes bankrupt, the account no longer contains money even though your computer says it does. So if anyone reverses a deposit quickly enough your computer is going to let it through and you're paying for it.
Your example is interesting but I don't see how a bank can be held liable if the bankruptcy wasn't communicated to it properly, is there any proof it's a real thing?
The example in the article is different if I read it right: bankruptcy was already known to all parties, account frozen, but the debtor asked court if some operations can be resumed except for chargebacks.