Analytical methodologies need to be further developed to allow for real-time, in-process monitoring and control prior to the formation of hazardous substances.
When a chemist is performing a reaction in a lab, they usually have no idea what is happening unless a colour change occurs or there is some other visual cue. So it is good practice to sample the reaction from time to time by removing a small portion and analysing it to confirm if all the reactants have reacted or not. The typical way of doing this 'reaction monitoring' is by thin layer chromatography or gas chromatography. The details of these techniques are not important here, only to say the results take 10 minutes or more to obtain. In that time, your reaction could have exploded or the product decomposed from prolonged heating.
Engineers are usually working with greater quantities of chemicals which exacerbates safety hazards but they have more sophisticated reaction monitoring analytics. Real-time temperature monitoring and control is needed to spot if a reaction is heating up too rapidly. Continuous analysis of the reaction mixture can be automated to get a better feel for the progress of the reaction. This information can be used to optimise reaction temperature and time.
A fascinating development in the world of chemistry safety is the digital twin. A digitial twin is a virtual duplicate of a process. This innovation, emerging from Industry 4.0 technologies, enables us to understand how variables such as temperature, pressure, mixing rate, etc. influence the reaction. Simulations can be run to optimise the process and minimise the risk that an accident occurs.