Sketch resumption after power loss

The link to the wiki posted by user @TomGeorge
has a really useful description:

It is the paragrah with titel

Regulated Power Supply

NO !
A simple MOSFET is NOT suitable. Threshold-voltage means the MOS-FET starts to be conducting but still has a reasonable resistance. This means the MOS-FET will dissipate quite some power into heat.

You really need to use an OpAmp with external circuitry forming a schmitt-trigger with hysteresis. This is a circuit that will switch FULLY on at a adjusable voltage and will will switch only off in case the voltage goes below a different voltage which is not only 1 microvolt lower but adjustable lower like 0.1V to make sure the circuit will not oscillate on/off/on/off...

And the output of this circuit can then be connected to the switchable EN-able-input of your solar-power-management-system witch contains two things:

  1. a charge-controller
    and
  2. a step-up-power-supply creating 5V