Reminds me of a script a colleague has where it would sometimes accidentally wipe the entire production folder on a server. I pointed out the risk in his script and explained how to correct it like 2 years ago, give or take. He said he did, but then last week it happened again because apparently he had several scripts like that and only corrected one.
You can lead a horse to water, but you can’t force it to drink.
I use an HP microserver gen 8, which I bought second hand (300$) and upgraded with a better CPU (20$ from ebay) and extra ram (80$) and 4 2TB SSD’s (100$ per). I installed Windows server on it because I just wanted it to work in a way I’m familiar with, but a colleague of mine installed Synology OS on it. You can use the cd drive bay for the OS disk (with some tweaking). Since you already have the disks, this would fit your budget.