And just to close the story, I went with a PCB pin header like this
https://res.cloudinary.com/rsc/image/upload/b_rgb:FFFFFF,c_pad,dpr_1.0,f_auto,h_843,q_auto,w_1500/c_pad,h_843,w_1500/F7019878-01?pgw=1&pgwact=1
This is for the four wires that are not really needed and can be connected with shunts like these:
in whatever configuration you want.
For the motor wires I went with a female JST connector like this:
to avoid shorting them by accident.
On the motor side I just put PCB headers as above for the power supply wires and left the other four unterminated. I will decide in the future what to do with those, probably another two JST connectors but for now I am done. Fiddly job but I've got what I wanted. Hopefully LEGO will come to their senses one day and save us all this dicking about.