The second example sounds a bit like the citi debt thing where they accidentally paid the entire principal when they meant only to pay a part.
https://arstechnica.com/tech-policy/2021/02/citibank-just-go...
Maybe I'm stretching it a bit, but the element of reasonably assuming that it was intentional seems similar. I'm sure there are some differentiating intricacies in the law though.