When I need to lengthen motor wires, I used
these. I remove the metal insert (use an Xacto to slice down the middle of the plastic case and push the metal part out), tin the insides so about 3/4 of it is filled with solder, insert/solder the wire in there, and then heatshrink the whole thing. It works well and makes a clean inline wiring look with only a slight bump in the heatshrink. You can see what it looks like
here - look at curve of the motor wires.