It seems everyone working in the industry has the same challenges. If you wear decent clothes, you have to crawl through cable alleys, if you wear grubbies, you discover a meeting with your boss's boss.
I divide my time between internal IT and field service, so I have to prepare for anything. We have no defined dress code, but the customers will walk through the tech shop several times a day, so a certain level of neatness is required.
My office dress code is modified business casual (for our industrial environment) neat blue jeans (no holes, no paint marks, fitted properly), long sleeved shirts (not denim, but similar weight of cloth) and steel toed work boots with a decent coat of polish (the military taught me how).
I find that with this "standard" and a couple of extras I can go anywhere and fit in.
A business meeting with the boss or a client means rolling down the shirt sleeves, grab the black sports coat from the hanger and run a cloth over my boots.
Moving equipment or running cable calls for the dark blue lab coat with lots of pockets for tools and stuff. It also works well for visits to the shop floor as it doesn't show dirt well.
Field service calls to industrial plant sites often require fire proof coveralls and I use the blue and yellow ones from my oilfield days.
As I am never going to work in sales again and I am not interested in the management career track, I see no reason to adopt their dress code.
I do have some limits to "casual" as I will not show up at the office in shorts, sandals or baseball caps. I also vet my t-shirts and golf shirts to avoid anything which does not present a reasonably professional profile (my collection of band t-shirts stays home).
On those occasions where clients have commented on my somewhat casual dress while working, I observed that I could wear business suits and expensive shoes while trying to do service work. As I would destroy these items quite often while doing my work, I would have to increase my hourly rates to cover the added expense of replacing good clothing. I would then ask if they wanted the service rates to increase so that they could define my dress standard. So far every client (legal firms, banks, accounting firms, etc.) have agreed that it was not worth the extra expense for the formal clothing.
Not the only approach to a dress code, but one that works for me in my industry.