Security agencies, when their administer the polygraph, will ask the subject how well they are familiar with how polygraphs work. Sometimes they will drop some polygraph test jargons words into the conversation to see if the subject reacts to them. Knowing the truth about the polygraph test usually renders the polygraph test ineffective. Such subjects usually "fail" the test because of attempt to use "counter-measures".
As for sphincter muscles, the pin in the shoe, some basic breathing tricks -- those are easily detectable by "expert" polygraph administrators.
The danger of polygraph tests is that they actually prevent people who are too honest to pass, but they will let sociopaths or those who lie slightly to pass easier.
There was this man, and he was not confessing. Thus, creative police officers got a lettuce sieve, attached it with some wires to a copier and put a paper reading "He lied" on the copier.
Given this, they put the sieve on his head and whenever he said something they had a slight doubt about, they pushed the lie detector button and the lie was "detected". Eventually the man confessed.
Its an urban legend, but it illustrates the point quite nicely in my opinion.
I don't know if the show took inspiration from the urban legend or if maybe the legend can be traced back to the show. Either way, I highly recommend the Wire.
I'm interested to learn more about this technique - any links/keywords?
On Penn and Teller's "Bullshit" show they did an episode about this. One of the more disturbing things I learned is that, despite internal research that showed no effectiveness whatsoever, Sandia National Laboratories went ahead with the decision to require random polygraph testing. Also, apparently you can use your anal sphincter muscles to outwit a polygraph test.