Headlight switch , is it the cause? or the curse?

Just to mension ; on a DD,the dimmer switch spends a lot of time in a moist,dirty, environment. I have seen a few give up.