According to "How the States Got Their Shapes" on the History Channel, that this phrase comes from old miners who would carry a length of chain with them for a very specific purpose. The bathroom that was used in the lower levels of the mine was actually on wheels on a track so it (along with all the waste) could be moved out of the mine when it was full. It was a common practical joke to unlock the break and push the "honey wagon" down the track while someone was sitting on it. So, miners carried a length of chain to lay in front of one of the wheels to act as a brake in case someone decided to pull this prank. Hence the phrase, "Don't yank my chain?". Especially when I'm pooping.