So, I haven't worked in semiconductors since the mid-noughties, so keep that in mind. However, essentially every company in semiconductors in the 60's and 70's ended up with a Superfund site in Silicon Valley (back when the "Silicon" referred to actual chip manufacturing, not software). Fabs built in the 80's and 90's were much different in regards to how toxic chemicals were handled, and I believe have continued to improve.
Some of this improvement came naturally, as the requirement for cleaner and cleaner manufacturing environment for the wafers themselves (to keep particulate contamination from lowering yield) meant that the chemicals were kept in enclosed systems, thus easier to keep from leaking out.
Some of this came about because, from what I was told by "old timers", in the 60's and 70's part of the problem was that fabs were not thought of as being very dangerous. This sounds incredible now, but the risks people thought of from manufacturing then were those present in steel mills, coal mines, auto factories, etc. Big heavy things and molten steel and roofs that can collapse on you; physically obvious risks. It took some time to realize that semiconductor fabs were just as dangerous; no doubt longer than it should have, but the realization did arrive in time.
I left the semiconductor industry because it was outsourcing, not because of concerns for my safety; in new fabs, there was a great emphasis on safety and the environmental impact (which no doubt raised costs relative to some of the other places that manufacturing shifted to).