Considering that until 20 years ago (before switching to CFL) I had to change a few bulbs every year and now, after almost 10 years after switching to LED lamps I did not have to replace any of them yet, I believe that their effect on the environment is less than that of previous technologies, even when not counting the energy savings.
I have worked in semiconductor device manufacturing, so I am much more aware of the quantities of materials and energy that goes into them than most.
Except for special applications like solar panels, most semiconductor devices are very small (much smaller than their visible packages) and they form a very small fraction of a complete electronic device. In many cases a low-tech device and a high-tech device of similar size may have similar environmental impacts, determined more by the amount of copper and other metals and of plastic and glass, than by the types of semiconductor chips that might be included in them.
The only solution for the environmental impact of industrial manufacturing would be legislation that would make a list with chemical elements that are less abundant and/or more difficult to extract or to dump without environmental damage and which would mandate that they must be used in closed circle.
That means that for any industrial product that would contain some of the listed elements, the manufacturing company or another company contracted by them would have to design a process for recovering those elements from the finished product, and not only, like it is done now, the manufacturing process that converts the raw materials into the finished product.
To receive the license to sell any such product, the manufacturer should have to demonstrate that the recycling process exceeds some recovery efficiency mandated by law, e.g. 90%.
The selling price of all affected products should include the cost of the recycling process, not like the fake prices of today, when many people enjoy what look like cheap products, but that is only because someone else will have to pay in the future for the consequences of how they have been made.
Until such laws are enacted everywhere, any other measures just delay the undesirable outcome.