There is a delicate balance of relay frequency vs ripple. Too fast, contacts fail to break fully, and sizzle with erosion. Slowing down rate, done by increasing ripple, voltage difference (hysteresis) between "ON" and "OFF". Electronic switch, a transistor is much faster and cleaner switching. Immune to vibration, spider nests, mechanical wear, point erosion, spring weakening...