So I would definitely not build a custom (DIY) solution for that.
I now have 10 NAS devices in the basement, the oldest of which (about 14 years old) is a Synology RS408 with 4x 1.5TB desktop hard drives and a very old DSM 4.2 system. So far, I have never had a NAS failure myself (only replaced some drives). At a customer’s site, I once replaced both an external and an internal power supply in more than a hundred NAS devices. Both QNAP and Synology can really build good NAS devices. They are now running very reliably!
If you want a bit more (double) performance, take the DS220+, otherwise the DS218 is sufficient. As already mentioned, think about an (automated and controlled) backup of the NAS! A NAS is not a server! (You have to repeat this often enough until even the last person gets it.) Backup including status message on (mis)success works well with the free "Hybrid Backup Sync".
A UPS just for the NAS as suggested by is difficult due to the too low! load. But just connect the router, switch etc. as well, then it should be fine. Most UPSs require a minimum load to run "acceptably" (this is my latest knowledge on the subject, which might no longer be correct).