Barge poles are long. They used to be used to propel barges. If you wouldn't touch something even with a very long pole, then that thing must be pretty unpleasant.
It's frequently difficult to establish who was first to say something, since records of spoken words are relatively recent. However, if it is of interest to you, the earliest-record version was an entry in Lady Monkwell's diary for 1893. It read: "It will be a long time before any political party touches Home Rule again with the end of a barge-pole." (The reference was clearly to Home Rule for Ireland.)
I don't know what happened above, but it was supposed to say "the earliest-recorded written version" with 'written' underlined and the rest of it not underlined! Clearly, I got my fingers tangled up again.