If the flickering comes from poor conversion of AC mains supply to the DC needed to power the diodes, presumably an LED powered from DC, eg a battery, does not flicker.
Simplistically true, but not for the reason you'd expect. An efficient DC->DC converter is much the same internally as an AC->DC switched-mode power supply
[1], and with battery-powered devices what the converter lacks in efficiency you have to make up for with more battery, so manufacturers of battery-powered lighting tend to make a better effort with the drivers.
It's basically a case of certain cost-cutting driver designs (capacitive droppers and the like) that inherently flicker at twice the mains voltage being impractical with DC, rather than a fundamental AC/DC thing.
And if an LED lamp is designed to be dimmable, they nearly always do it by pulse-width modulation (ie. switching on and off at variable duty cycle), rather than controlling the DC current through the LED. There are sound reasons for that - simple, efficient dimming electronics, consistent brightness control, and the colour of the light not going funny at the bottom end - but most PWM drivers operate at a frequency in the hundreds of hertz that is merely considered to be 'good enough'. There's some movement towards designing theses things to operate above the human auditory range (coils and such in the drivers can produce an audible whistle), which neatly solves the flicker problem (not even barakta can see a light flickering at 20kHz), but I wouldn't hold your breath.
LED domestic lighting seems to be here to stay, so perhaps it's time to look at the domestic power supply. Could we have a separate DC supply specifically for lighting, either rectified on a per-building basis or once for each district? Apparently in the past some countries did have separate domestic lighting and power supplies as each was metered differently, though the supply was the same.
No point. DC or AC, transmission losses go up with the square of the current (and the length of the line), so you want to keep the voltage high for as long as possible to reduce that. Converting high-voltage DC to an appropriate voltage for driving LEDs is at least as difficult as converting high-voltage AC to an appropriate voltage.
What's needed are standards and regulation for the flicker of lighting, like the ones we have for brightness and energy consumption. First allow people to know which of the identical-looking lamps in the shop have flicker-free driver electronics, and then mandate that lamps with more than some quantitative flicker measurement not be fitted in new builds or even sold.
Like energy consumption, it's easy enough to test for, given suitable equipment. You expect the bulbs in the lightbulb shop to be marked with their power consumption, let's require them to be marked with their flicker-factor
[2].
I'm not convinced domestic LEDs are overall an environmental benefit in any case. In addition to the flickering and health issues, the electronic thingers in them are a bit nastier than a strand of wire in a vacuum, and it all gets thrown away at the end.
Agreed. We've got to the point where an LED fixture develops a fault after n years, and the solution is to throw the entire fixture in the bin. That's clearly stupid.
Obviously it's not in the manufacturer's interests to design them conservatively for longer life (which is approximately a thermal design trade-off against brightness and materials cost), or for ease of repair.
[1] The average wall-wart first rectifies your 240V AC supply to about 338V DC, before converting to regulated lower voltage with high-frequency switchy regulatey cleverness. Many will happily run on DC with no modifications (albeit with some risk of overheating).
[2] I predict some single consumer-friendly rating that encompasses frequency, depth of modulation, and weird phosphor-lag colour effects.