I wouldn’t hesitate to solder that. In fact, a poor connection to a motor would be the Achilles heel of a stepper driver, so you could easily make the argument that soldering would be superior to adding yet another quick-break connector.
You don’t have to go nuts, I see a lot of people start lineman splices and I wouldn’t for wire of that size. I’d simply strip some insulation off, hold each side with my handy-dandy alligator clip holders, and tag it with some solder, it won’t come apart. In fact, that is how those existing male Molex connectors are attached to the wires.
Don’t forget to put the shrink-wrap over the wire before you solder.