I have two Macs: a mid-2012 Mini and a new MacBook Pro TouchBar laptop. The Mini was a replacement for my old 17" (PPC) PowerBook - not because it died, but because nothing would run on the Motorola chip any more. I bought the older Mini over the newer one, because it was user-upgradeable. I added the max amount of RAM, selling the old back to OWC for almost nothing because I didn’t have a use for it. I bought an SSD and the disk-doubler kit from OWC. Installed the new drive alongside the original spinner, using the SSD for the OS and the spinner for data, including iTunes library (SSD space is expensive). Boot time went from over a minute to 15 seconds. The Mini is booted and running in 15 seconds.
That said … at one point the hard drive on the PowerBook was failing, so I bought an external FireWire enclosure and disk. You can boot a Mac off a FireWire disk. I used the external drive for about two years as the main hard drive for the PowerBook, until I had time to open it and replace the internal drive. I bought that laptop in December 2004, and it is still operating. It’s used just for web browsing and email by a family member and it works fine.
I have no complaints about my 2012 Mini, except I realized I really did need a laptop, so I got one. I figure I might as well get the new one, and keep it forever. It might be marginally cheaper to just keep trading up to last year’s model, but I do enjoy the rush of a new computer so I indulge. If you need to replace a desktop, you can probably find a user-upgradeable Mini for cheap. But since your iMac is working, what about just getting an external drive and cloning your internal drive to it? You can use SuperDuper to back up your current machine to that drive and make it bootable. Then if the iMac dies, just boot off the external and keep on truckin’.
As a bonus, the mid-2012 Mini has hella ports for whatever peripheral you have around, unlike the new Mac Book Pro with has USB-C. Period.