There are many ways to preserve and extend the health of an anchor windlass. Squishing dielectric grease onto electrical terminals (including those for foot controls) is a good way not only to protect said terminals but also to make sure you have an anchor when you need one. And rinsing away salt water with fresh is also important.
But probably the most critical thing you can do to preserve the well-being of an anchor windlass is to retrieve your anchor in the correct manner after deploying it. You do this by using your boat’s engine(s) to follow the anchor rode on the bottom as you pick it up, usually with the help of a crew member who is conveying directions via hand signals. Using your puny electric windlass motor to routinely haul a super-hefty boat to her anchor can take years off the motor.