Keep a plain-text state file next to the script with one completed step name per line.

After a step succeeds, append its name to the state file before starting the next step; write through a temporary file plus rename if a crash mid-write would corrupt the list.

On startup, read the state file and skip every step already listed; run only the first unlisted step onward.

Delete the state file only after the final step succeeds, so a finished run starts clean next time.