This is why wax motors are used for washing machine door locks.
Mayne you know, are the internal components already designed with corrosion in mind?
> When a cycle is started, a wax motor is actuated pushing a pin outward and locking the door. This design has cost, reliability and safety advantages. In moist conditions a wax motor costs less for equivalent reliability than an electromagnetic solenoid or motor latch. It has a predictable passive release delay. If power is lost the door remains briefly locked, designed to be longer than the high speed spin cycle coast-down time, then reliably unlocks as the wax cools.