Digital vs. analog pins
"Analog pin" is misleading nomenclature. Every pin is a digtal pin, but some digital pins happen to also be connected to the analog-to-digital converter and can thus also handle measuring analog signals.

Every analog pin can also serve as a perfectly good digital pin. The reverse is not true; if something requires an analog pin you cannot use a digital pin. The only things that require analog pins are the thermistors, for the rest (motors, MOSFETS, endstops,...) you can use either a digital pin or an analog pin.