40 miles is a hell of a commute, especially in winter.
I'd want something with drop bars and proper full fenders if I were going to tackle it. Not sure how much snow you get, but if it is anything like Chicago, there will be a lot of days when it is just not worth the risk of falling down and getting run over, or just getting run over.
The grit you're thinking of ignoring: where would it go? Would it mostly land in harmless areas or is it going to mess up the front derailleur? It will for sure mess up your chain and sprockets.
I was thinking about winter commuting, but to me, it is just not going to be worth the risk of getting run over. Our streets out here don't have sidewalks, the shoulders are gravel, and they plow the snow onto them anyway. My commute would be about a mile each way, but still not worth the risk.
Forget the fenders and look for a beater car.