I’ve had the opposite experience between Logitech and Razer, at least when it comes to mice. Every modern Logitech mouse I’ve had (3) has had the right and left click switches replaced as they started double clicking right after the warranty expired.
Logitech are actually using the wrong switches as they’re running them below their design voltage and is causing premature failure. I swapped them out with appropriately rated switches and they are still in service, now for much longer than the original switches.
When the failure started though I switched my main mouse to a Razer with optical switches and have had zero problems with the hardware. Software wise, Polychromatic + OpenRazer on Linux works better than Razer’s software on Windows. Razer’s software leaves a lot to be desired, but Logitech’s software is only marginally better.