If you kill the power before the voltage regulator, do you have time time store things in EEPROM?

if you add a capacitor (1000µF) and a diode, and measure when you loose Vin you can reliable write your settings to EEPROM with that 1000µF.

edit: found an old post of mine with several values/diodes: