DC motor keeps wearing out

The "D" in L293D means that the diodes are built in.

The L293 lacks freewheeling diodes.