An even better fix for this category of problems is DC distribution at the homelab scale. I've replaced most of my 5V and 12V wall warts with a PC PSU. A number of transient issues that used to affect some of the gear disappeared.
At Chaos Communication Camp (2023) I brought a hard drive to attach to a Raspberry Pi with a USB adapter, and a little solar power system because I could.
I realized the inverter was using about 5 watts idle and that was about half of my average power budget for the camp (counting night time), so I cut the adapter's cable and re-wired it directly to the battery. Worked fine. Most components in a computer that nominally run at 12V are passing it through some sort of adaptive converter (either a buck converter or directly to a speed-controlled motor) so they have a fairly wide voltage tolerance. I obviously didn't find out if it reduced the lifespan at all.