The lighting requirements depends on the untended use. A trail ride is a dumb case. To flood the front area with more light. Just attach any flashlight powerful enough to the bike and you're all set. But a road ride is a more complex case because generally, a well collimated beam of several degree of divergence angle is required (you can always add some diffusion if necessary, it's not a problem). According to the optics science (etendue etc.), the larger the aperture size (the lenses diameter), the more collimated beam can be produced with given light source aperture and target efficiency loss. That does not mean that such a beam can't be produced with a small lenses, I've old Inova X1 spotlight that has a lenses of the AA battery diameter and produces a beam like that of laser pointer. But that's with high losses. If you remember, old bicycle headlights were quite big, of more than 50 mm housing outer diameter. I presume that's because incandescence bulbs produce not so much light and it was essential to minimize the losses. But actually, a LED has less brightness density, it uses larger light emitting surface (source aperture) to produce higher perceived brightness. It's typical for a power LED to have 1x1 mm emitting surface area, which is much larger than that for the incandescence. That means that a LED requires even greater lenses aperture (at least 40 mm effective aperture diameter for automotive headlight applications AFAIR). While most of the modern bicycle headlights are much smaller. Perhaps that's because now it's not necessary to be an optics engineer to design and sell a cute LED lighting device packed with Wi-Fi, BT and Ant features.
One of my former colleagues was a railway automation engineer by education. According to him, it usually does not make sense to build a hermetically sealed housing for an outdoor equipment. It's not a diving equipment, after all. It adds cost with little to no benefits. Even with no leaks, the water will appear from the internal air as the temperature change. Soon, the vapors will reach the electronic components (no matter of conformal coating) and start the corrosion. It's possible to fill the internal volume with a pressurized inert gas, but that adds even more cost and maintenance burden. A better approach is to build a splash-proof housing and fill the inside with a sticky viscous substance, like grease, fat, etc. That makes a visual inspection during the maintenance a nightmare, but it really works and it's cheap. For a bicycle accessory device, the water-tightness is a nonsense. It's not technically feasible for a cheap and lightweight device. Instead, it shall be made such that user can easy take it apart for periodic drying, cleaning and possible parts replacement. It's a very important requirement for bicycle headlight, but currently I'm not aware of such a headlights too.
The images below are for B&M IQ-XS E headlight. The IQ2-Tec optics that uses additional small prism. It's a well known model so many reviews can be found on the internet (e.g.
https://fahrradbeleuchtung-info.de/testbericht-busch-mueller-iq-xs-e) and some the images are not mine. It's not super easy to take it apart but that's perfectly doable with no damage using a plastic card of the right thickness. I'd used my old driving license for that. It's a E-bike version so there are no huge caps for energy storage inside. It's of recent batch with re-designed reflector for horizontally wider beam.
It's a lighting device so optics is king while electronics is of secondary importance. But here is an electronics forum so some words about. There is no MCU (isn't it very good?) since the automatic switching between the night and day modes is done in a simple HW way by the mean of phototransistor. The BOM:
IC1: TI LM3404MA (1.0 A CC buck regulator for high power LEDs)
IC2: TI LM2731XMF (1.6 MHz boost converter with 22V internal FET switch)
T1, T5: OnSemi FDC5614P (P-channel logic level MOSFET, 60V 3A, 105mΩ)
T2: Diodes DMN2058U (20V N-channel enhancement mode MOSFET)
T3: Diodes DMG3420QU (20V N-channel enhancement mode MOSFET)
T4: Diodes BSS138W (50V 200mA N-channel enhancement mode MOSFET)
T20: Osram SFH 320 FA (IR NPN phototransistor, 980nm, 120°), likely
LED1: Osram KW HHL532.TK (3.2W, 395 lm)