Ever since APFS was developed, I've just been using a separate APFS volume for my User Directory... this has saved me countless times when I needed to reinstall macOS. Whenever I need to reinstall, I can format the installation volume just fine, no data loss (except perhaps for the apps in the /Applications folder, but one could theoretically make that it's own Volume as well).
Then when I reinstall macOS, and I create a user, I just go to System Preference->Users and Groups->Advanced Options, and point the newly created user's home directory to my existing directory on the safe APFS volume.
Restart and boom, I pick up exactly where I left off, sometimes I may have to re-login to iCloud, sometimes not.