If you're not using anything after startup which could affect the z-height (like a nozzle cleaning routine) and you're not slicing for vase mode (which makes z-based triggers impossible) and you're not having the hotend purge at the back of the print bed (again, changing the z-height) then you're down to just simple time-based timelapses.
It may be worth rechecking to make sure that both ends of your Pi's power adapter are firmly connected. (A moving printer can vibrate things loose, to include the power.)