First, let's not look at credit card payments which work very differently from what you describe (the 'network' i.e. MasterCard company, Visa, etc play a big role) but at payer-initiated transfers.

Second, keep in mind that in almost all cases you won't have a bilateral relationship, this is unrealistic to have every institution to handle close relationships with each other - instead, usually the best case you can rely on is a "star" scheme where any A in some market can reach any B in the same market by sending a payment message + money to some "central" C and asking that C to forward the same money to B; and in more distant situations you can easily get 2,3,4 or more intermediaries for various reasons.

Third, be very careful with terms like "the account" - unless you add more specifics, all that "the account" generally means is "our accounting department believes that this is how much you owe us"; it should reflect 'having money' if accurate but it is not the same e.g. if you're unable to collect what your accounts say you own. If you say "A has $10 in their account with me" it literally means "As far as I know&have accounted for, I owe $10 to A, and should allow them to do stuff worth $10 as they order".

But for the main points - your proposal has two weak spots.
1) It requires any paying institution to have large available reserve funds with all receiving institutions. I.e. if I'm bank A, and I want my large corporate customer to be able to send $100m to any of the banks B,C,D,E,F,G,H,I,J,K when chey choose to, then I would have to keep $100m 'in my account' with each of them (or alternatively, have a credit line, where I'm sure that they will allow me to overdraft $100m) - in this case this requires having $1b of capital just so I can have this capability even in this small toy example. If you'd want to have more potential recipients instead of 10, you'd need even more capital. Part of this is actually done so in practice, but as you can see it's not that simple.

2) Your proposed messages (which are similar to real world implementation) + appropriate legal agreements only achieve that after all this ritual is completed, there is a legally binding situation that yes, the sending bank does owe the receiving/executing bank the required amount.

However, from a risk-averse viewpoint "the money" is transferred from A to B if and only if B is ensured to have full access to the full money (as in, they can actually request it driven by a truck to them and be sure that this will happen) even if e.g. A declares insolvency after sending all the required messages.

Do note that in the usual insolvency procedures, if A has $10 as "funds available in the account of A" (i.e. you owe $10 to A) and also A legally owes you $10 for the payment you did an hour ago, then you will not be able to take that $10 - all their assets (e.g. money in that account) will be split among all the creditors, so you can expect to actually not get most of that money in such an event. This is part of the 'liability hot potato'; it goes a bit deeper but you'd need a finance lawyer to explain it in more detail.

You would expect to be safe from counterparty risk only after 'your account' with the sending bank shows 0, they have legally acknowledged so (which for various legal reasons depending on country may require an end of business day, not just a signed message from them), and you have "got the money" in some form that's more trustworthy than simply 100% legally&cryptographically secure acknowledgement that A owes you the money - e.g. a message from a truly trusted institution (e.g. your central bank) that they owe you this money and it will stay so even if A goes insolvent.