Unfortunately, I don't have any diagrams that show the colours of the wires inside the cables, and I'm not convinced that all harnesses and controls would use the same colours anyway, but this one indicates the function of each of the pins:
I would use cyanoacrylayte
(Superglue etc.) instead of Araldite as it will provide a stronger bond on the connector block assembly.
I suspect the full speed fault was caused by a faulty ground connection
(battery -ve) somewhere on one of the connectors or a wire within the harness. Check the centre pin of the eight pin round connector for cleanliness and make sure the plug is pushed completely into the socket.
If the throttle connector had been partially broken before the event, it could have slowly worked its way apart allowing the earth connection on the throttle to separate first causing instant full throttle.
You should always ensure that there is enough slack in the cable to allow the handlebars to go from lock to lock without straining any of the connections.
Alan