That's what I've done twice so that I would have a replacement battery immediately when needing it. In 2018, I bought a battery for our 2014 i3 that we bought new from a local East Penn Manufacturing battery dealer for considerably less than our BMW dealer's price. The original battery didn't begin to fail until 2021, so I stored the replacement for 3 years recharging it ~3 times/year so that it wouldn't self-discharge too much. An AGM battery has a long shelf life when it isn't allowed to self-discharge completely, so I was not worried about my stored battery degrading much. I sold our 2014 i3 within 6 months of replacing its battery and haven't kept in touch with the new owner, so I don't know how long the replacement battery lasted.
Since my 2018 battery purchase, East Penn Manufacturing seems to have limited the sale of its AUX18L to BMW dealers. I could no longer buy one from other local East Penn Manufacturing battery dealers in 2022 when I wanted to store one for eventual installation in the used 2019 i3 that I had purchased. I could have purchased an East Penn Manufacturing ETX18L motor sports battery from local dealers, but that's not an ideal battery for an i3.
Instead, I installed an
Ohmmu G1DC22 22 Ah lithium iron phosphate (LFP) battery in our 2019 i3 when its original battery failed after 4 years. When I bought our used 2021 i3, I swapped its original battery with the LFP battery in our 2019 i3. I have a second Ohmmu LFP battery in storage for installation when the Ohmmu battery in our 2021 i3 fails. I'm hoping that a LFP battery will have a much longer life than the OEM battery.