No software is perfect, but the aerospace industry has standards as far as software validation/verification that mean airplane software is in general less bug-ridden than comparably complex low-level software written for less risk-averse industries. Hard to say if that applies to any particular chemical or energy plant as well.