Using Arduino + MOSFET to automate the pressing of button
The SOT packages can save cost. But if there are multiple pins to be controlled individually, number of FETs required will be 2*No. of encoder pins


Source: MOSFET as a switch?