To "pull one's leg", as a saying, does seem to have the etymology you describe; every source I can find states that it dates back to the mid-1800s in England, and refers to physically tripping up another person, which puts him off balance, possibly makes him collide with others in awkward ways, and generally makes him look foolish. It quickly evolved to mean achieving that result - making a person look foolish - regardless of the specific means used. The most popular means to do so is to tell a deliberate plausible non-truth which, if believed, would lead the person react foolishly.
"Pulling one's plonker" by contrast seems to be a much newer term, still considered slang and rare in American usage (it's most common in British and Australian vernacular). It's one of many examples of introducing a sexual connotation to otherwise "innocent" idioms and sayings.