I believe that keys with optical switches are less reliable, being sensitive to things like sensor misalignment or dust.

I have not used any keyboard with optical switches, but several decades ago I have used keyboards with hall sensors, which had a superb quality and reliability, much better than anything that I have used later.

Sadly, I had to abandon the first keyboard that I have used with computers owned by me, which had Hall sensors, because it was not IBM PC compatible (its origin was in some DEC-compatible video terminal and I had used it with a Motorola MC68000 based PC, which I have replaced with a PC/AT clone, for which I had to use a compatible keyboard, of much lower quality).

Otherwise, I am certain that it would have remained perfectly functional until today, unlike the many keyboards that I had to replace since then, when too worn out.

I have a hall-effect keyboard from Wooting, and they are indeed excellent. Very reliable, and setting the trigger point in software/firmware allows a number of interesting features like triggering different key codes depending on how far you've pressed the key down, enabling more rapid keypresses or using keys as analog input.

Their first keyboards actually used optical switches, and from everything I've heard were less reliable, and tracking precision was much worse than with the magnetic switches