Personal hot take: It's super hard and no one cares very much.
With SSDs, booting is fast. Most apps that I care about which have complex state (browser, IDE) do a much better job of saving their state than the OS can do (browsers & IDEs can and do easily restore sessions, etc).