I had ask about the wiring on the motor
I'm not sure what you mean The motor of the icemaker looks like the picture below, but I have no idea why you would ever disconnect the wiring.
Now if you're talking about the ice dispenser motor, below is a picture of the 3 connection points where wires go. The green wire connects to the area where the blue arrow is pointing. This is just a connection point to the frame body of the motor so you can connect the green wire to any screw if you have an "eye hole" instead of a slip on connector by just unscrewing one of the screws, sliding the eye hole under the screw, and then screwing the bolt back down.
The other 2 wires go to where the red arrows are pointing and it doesn't matter which order you connect them.