I have tried: taping them together, hot glueing them together and ziptying it right to the frame to prevent jiggle.
All have failed.
Right now, when I reconnect them and apply pressure, I can't even get the engine to turn on anymore. But the speedometer still works and that signal is sent through the engine cable too.
Recently, sometimes the engine rear wheel barely rolls when I roll the bike backwards.
I'm not currently able to join Fuck Cars so I will answer here.
Sounds like the connector is poor quality so it won't make the eight connections properly. Find a motorcycle/scooter repair shop and have them either remove the connection and join the wires or put in a new high-quality connector.
Normally I would suggest using reddit to find someone local to do it but...
Is that an actual picture of them? Probably worth replacing the whole thing if it doesn't connect reliably, but if you don't want to do that and want to jerry rig a fix, might give gaffer's tape a try: It's great for stuff like this!