I just use a small flat head screw driver to pop the plug out of the socket. Just wedge the screw driver on the short side of the plug, and twist. I don't think you could use your method when the motor is in the car. Also, some motors have the sensor wire oriented in a way that won't allow your method.
Definitely better than pulling on the wires though.