getting credited? Why do you think that would happen? There should always be some verification at the time of the transaction. Whenever I make a deposit, I usually go inside the bank and deal with a teller (I'm old school). The teller always gives me a receipt and I always check it to make sure the amount is correct. If I use the ATM to make a deposit, the ATM spits out a receipt, and the same thing if I make a withdrawal.
One time, the bank made an error that would have been in my favor. A few years ago, I made a $10,000 deposit into my checking account. When the teller entered my deposit, she hit two too many zeros before the decimal point. She handed me a receipt showing that I had deposited $1,000,000. Not wanting her to get fired and not wanting the IRS coming after me for taxes on the one million, I pointed the error out right away.
As far as a scenario of something going against me, that also happened to me before and keeping my checkbook balanced help me to prove my case. One bank that I used to deal with back in the nineties sent me a notice telling me my checking account was overdrawn. I took my checkbook and bank statement with me and went in to talk to the manager. At that time, with that bank, I was making a lot of after hours ATM deposits and I told her they amount that they showed me being overdrawn was the exact amount of an ATM deposit I had made. She said that maybe I had forgotten to deposit the money into the envelope. I asked her if that was the case, why hadn't I been notified when they emptied the ATM the next day and recorded the deposits? Her face turned red and she admitted it was their mistake and credited the deposit to my account.
At any rate, you need to keep your checkbook balanced. If you don't, one of these days it could come back to bite you.