how to disconnect a data line with a digital output using the smallest component
You can use a 74HC125 type buffer driver. It has an Enable* input pin for each channel which puts the driver in high Z (disconnected) state. You can input the stepper control signal from Arduino into 2 buffer drivers and connect them with the 2 stepper motors. You can use the two remaining signals from Arduino to control the Enable* Inputs of all 8 drivers.