Good Ideas from talented indivudals

Replace the microswitch with a magnetic reed switch and place a small permanent magnet on the end of the rod. This would prevent any physical contact from the rod to the switch.