I have normally used APC uninterruptible power supply (ups) units like this one, currently $120, for mission critical pc units.
The key phrase is "line interactive" which levels out the power stream in addition to simple surge protection.
HDD Low Level Format Tool https://hddguru.com/software/HDD-LLF-Low-Level-Format-Tool/