Yes, but could we maybe get a decent approximation of the windshield temperature from interior temperature, exterior temperature, and speed? Combined with interior/exterior humidity (maybe these gauges might be the expensive/finicky part of this project?), we could calculate a probability of window fogging.
It doesn't have to be perfect -- we can have it just turn on the defrost whenever the probability of window fogging is >10% or something.