I can store it at what point it was at, in eprom then on startup it can start at that point, but that sure sounds super complicated.
Depends on the complexity of the algorithm itself. If your program is essentially a loop that have e.g. 10 variables that change during one iteration of the loop you can simply add some logic to store those ten vars every 2 hour to eeprom. In setup they are read from EEPROM.
if (millis() - lastStore > 2L * 60L * 60L *1000L)
lastStor = millis();
// rest of your code
to make it really fail safe you need to have at least 2 sets of variables in EEPROM including timestamp and a checkbyte to see it the written set is not corrupted due to a blackout during the save.