I did very similar to your last episode in my company truck. The check engine light came on but that’s normal for a GM so I planned to have it checked out at my next oil change. I was off one day and used it to go to the post office (I am allowed personal use for a low per mile cost.)
I ended up going to the hardware store 20 miles away and when I got back to the truck the battery was dead. No problem, I went back in and bought a battery and booster cables. I didn’t have my wallet but had a CC in the glove compartment. It was declined.

Luckily the bank next door was open so I walked over and took out enough money to pay the bill.
When I got home and checked my cell phone I had a text. phone call and email from my CC holder telling me that the card was declined because of a fraud alert. What’s the sense of having the card for emergencies if it isn’t going to work when you need it?
The worst part though is the embarrassment of having the card declined.