Every gas meter I've ever had has been purely mechanical. Have you ever seen one that needed mains electricity to work, and that acted like a shutoff valve when it lost it?
You’re right about the gas meter, but the town/city infrastructure necessary to pump gas through said meter does rely on electricity. They have backups, but for how long? Long enough to ride out most power outages, but nothing unexpectedly extended.
Many rural houses have tanks on site because there are no public gas lines to connect to. My house has a 1000 gallon tank and is not vulnerable to the above, for example.