Let's start from the end. The corrosion is because the battery died, produced hydrogen gas, which ruptured the casing and leaked the internal material (probably potassium carbonate).
To avoid that, you have to avoid having the batteries die.
Batteries die for a few reasons:
- Discharge because they are in a device (a trickle current drains the batteries)
- The chemistry degrades and discharges the battery slowly (over the course of 5-10 years depending on the battery type). Discharge speed increases with temperature
- The battery is subjected to moisture or high humidity that corrodes the battery casing and causes it to fail (which among other things, rapidly dehydrates the battery)
- The battery is subjected to very low moisture and it slowly drains the battery of moisture, increasing internal resistance and reducing life
So to store batteries, store them in a moderate humidity and between about 50-70 degrees F.
Given that, some comments:
- A glovebox gets very hot and will rapidly increase battery discharge. It's a bad place for batteries
- A refrigerator or (especially a frost-free) freezer will be low relative humidity and dry out batteries (if you refrigerate or freeze, they should be inside a water proof container, like sealed mylar)
- It's possible taping the flat terminal with electrical tape would help supplement the plastic seal and slow drying of a battery, but I suspect that is minor
- Taping a battery inside a device will help since it shuts down the trickle current that will kill the battery. With multiple batteries, for stopping trickle current, you only need to tape one, as you just need to break the electrical circuit.
Store them in a cool, reasonable humidity location. That's about the best you can do.
p.s. For a corroded terminal, if the corrosion is just crystal from the battery and not loss of the metal in the terminal, try a Q-tip and vinegar (with gloves). The crystal the battery leaks is a base and will be dissolved by the vinegar.