I’ve been an engineer/chemist for, uh, many years, too. Currently we have to wear FRC everywhere, so it’s jeans and long-sleeved t-shirts for me.
But, when I had to go with dressy-practical, stain-resistant khakis were the way to go. They’re usually treated, so they don’t “breathe” as well as normal khakis, but it takes a bit more to ruin them after you spill something on them in the lab.
I usually paired with stain/wrinkle-resistant oxfords. And a belt; wear a belt.