What do you mean by "something happens"? Besides, rescan usually doesn't take that long even if you store everything on HDD.
If you doe the full block download and then import all the private keys and after the last one do a rescan and it gets to 98% and then core crashes or you have a power outage or anything else happens to interrupt the process it starts the rescan from the beginning.
Or at least it used to work this way. Ran out of memory twice while pulling in a wallet years ago and both times it started from scratch.
-Dave
I see, although such interrupt usually should be rare occurrence. And looking at
https://github.com/bitcoin/bitcoin/pull/25036, it seems Bitcoin Core now save the rescan progress.