I have had one light failure in the past decade, my month long bike tour in Iceland was wet, lots of rain days. I had an XLC taillight and the circuitry corroded, quit working. But bike touring I always have two taillights, use AAA powered taillights. So, the XLC failure meant I had one still working.
Currently for non-dyno powered taillights use Planet Bike Superflash and also have Planet Bike Superflash 65. Both are AAA powered. Also have a discontinued model of a Planet Bike taillight that is over a decade old as spare. I use low discharge rechargeable NiMH AAA batteries, Eneloops or Ikea Ladda.
On two bikes I have Spaninga Pixeo taillights attached to the fenders, both are dynopower, work great. And have a B&M Secula Plus dynopower tailight with a seatstay mount (zip tie) on another bike.
Headlights that are attached to my bikes, all are dyno powered. I have a couple Luxos U lights, they have worked great but have a bad reputation for water ingress so I am quite careful with those, if it starts to rain a plastic bag goes over them. And have a couple B&M IQ-XS lights. The B&M headlights are poorly sealed on the bottom and rear, so care must be used to mount where there is no tire spray, I think these lights are best used with fenders.
I described my dynopowered lighting system on one of my bikes at this link:
https://www.bikeforums.net/electroni...b-charger.html
Touring on my S&S coupled bike, I no longer bring a headlight that is mounted on the bike. But in case I encounter a tunnel or need to ride at night, I have one that runs on a USB cable that I can plug into my powerbank, attaches to handlebar with an elastic. I mostly carry it as a just-in-case light. It was $5 on Ebay, shipped from Asia, but I just looked on Ebay for a link to it, I no longer see that light sold. That light is in the photo below, but it has only been used a few times and it has not gotten wet yet, so reliability is as of yet unknown.