Arduino serial communication fails when stalling/loading a DC motor controlled by PWM
I think the problem is the solderless breadboard. The motor connections will be taking a lot of current, which is unsuitable for the spring contacts in the breadboard, and introduces noise into the Arduino supply via the common ground when the motor stalls. The motor could be taking 1A or so under a heavy load or stall condition and those solderless breadboards are only rated for a few mA, IIRC. Wire the circuit up properly on a PCB or a prototyping board, with a single-point ground, and your problem will probably go away. Or, avoid stalling the motor and subjecting it to a heavy load.

You could monitor the motor current with a sense resistor and ADC input on the Arduino, turn off the drive when the current becomes excessive, and light an LED to indicate a fault condition.