For me personally redoing my PC is worth couple of years of backup subscription plus HDD docking station plus two 4TB hard drives dedicated to backups.
I think for my next machine I'm going to dump Mac OS and switch Windows + WSL so may investigate fully automating my setup and config then.
I have a bunch of custom-compiled software with options for my specific needs, and my two main computers (PC and a laptop) have both huge history of various workaround that I don't even remember any longer and would have to research all of them again. I also have a bunch of Virtualbox VMs. These are a Windows VM configured for remote work, couple Linux VMS with configurations for embedded development (I do ARM development). I have one dedicated to Matlab, Simulink and LabView and host of plugins and customizations.
While keeping dotfiles and scripts is easy (I just have a repository on bitbucket) I would still have to spend a day or two just getting everything in order and probably much more to get these VMS for embedded development which is just full of workarounds for various problems.
As a contractor paid by the hour I am aware of my hourly rate and this helps me put things in perspective. Once you calculate the value of services and tools what seemed expensive frequently becomes dirt cheap when you factor time saved or risk averted.
For backup I keep USB docking station and two 4TB HDDs. I try to keep one of them at a different site. I also keep a copy on an online service mostly for convenience but also as another layer of protection.