Varied uses of 10-foot poles in the nineteenth century
The expression was certainly well established by 1850, but I couldn't find any instances of it dating to the 1700s. In fact, the earliest instance I could find of "with a ten [or 10] foot pole" in various book and newspaper databases is from a letter dated February 14, 1828 in Abiel Abbot, Letters Written in the Interior of Cuba (1829) [snippet view]:
A yoke is placed behind their [the oxen's] horns at the root, and so fixed to them with fillets and ropes, that they draw or push by their horns without chafing. A rope or thong leads from that gear to the nostril, which is perforated to receive it. A rope thus fastened to the nose of each ox, is sometimes seen in the hand of a man leading the team, as we lead a horse by the bridle; and sometimes the teamster holds the rope in his hand, and walks by the side of the cattle, goading the animals with a ten-foot pole.
This instance suggests a possible source of the expression that is different from the ones raised heretofore: using a ten-foot pole as a goad. Although the evidence for such an original meaning is circumstantial and rather slender, it certainly makes sense as an image of distancing oneself from something not to be approached too closely.
Another interesting instance appears in a long philosophical poem titled "Geraldine," in Rufus Dawes, Geraldine, Athenia of Damascus, and Miscellaneous Poems (1839):
pity him who loves to speculate/ On the sublime relations of the soul,/ Yet narrows down his views at such a rate,/ He'd measure heaven with a ten-foot pole—/ Who dares not dive in those forbidden wells,/ Where truth, with falsehood mingled, ever dwells.
Here the sense of "with a ten-foot pole" seems to be "with ridiculously inappropriate exactitude"—but in any case, the wording involves measuring with the length of the pole, not touching or fending off with the extreme end of the pole.
Use of 10-foot-poles for measurement in surveying (and probably for other purposes as well) seems to have been well established in the early nineteenth century, as these excerpts from Thomas Williamson, Mathematics Simplified and Practically Illustrated (1808):
How Surveys are to be taken with the Standard Triangle.
To survey the field CDFE, proceed to nearly its center; or, if any thing, more towards its shorter side, as the angles drawn from the base-line, AB, towards C and D, will be separate, and more on an equality with those towards E and F. Here it is proper to remark, that very acute angles should generally be avoided ; open, or obtuse angles, (not too much so), are easier ascertained ; for, it must be obvious, that two lines which proceed very close to each other, for any distance, do not afford so distinct a point of contact as two that cross at right angles; in which the exact intersection cannot easily be mistaken.
Measure your base-line with great exactness, carefully examining, with your ten-foot pole, as to the correctness of this particular. A long base is a very great advantage, as it makes the angle less acute.
...
Another sight, taken from the same spot, towards D, will ascertain, by means of a ten-foot pole, or a wand and flag, what may be the difference of height between D and E, by the same operation as is detailed in Example XV. and others; if any, it must be noted; ...
Indeed, an instance in which a 10-foot-pole is used in the course of measurement (although not with the precision of a yardstick) appears in Stephen Switzer, An Introduction to a General System of Hydrostaticks and Hydraulicks, Philosophical and Practical (1729):
To effect the same [gauging a means of conveying water over a distance of 1,000 yards] by the Water or Spirit-Level, you are to stand at the Spring-head, and having turn’d your instrument on the hanging Level, or, in other plainer Words, on the Hang of the Hill where the Water is to pass, let your Assistant set forwards with a ten Foot Pole or Rod in his Hand, and holding his Hand at about four or five Foot high, and let him move up and down the Hill till the Level exactly strikes the Assistant’s Hand ; and if you can carry it strait, let this be seventy, eighty, ninety, or 100 Yards, more or less, allowing the Quarter of an Inch to a Yard Fall, as is before specify’d, which suppose to be eighty Yards, you are to allow ten Inches lower to your Gauge-Stake, and bone in new Pins or Stakes at every fifteen Foot asunder ; from which Gauge you are to dig your Cut three Foot deep to lay your Pipes in ; or if it be a bank’d River or Sewer, you are to throw your Stuff in all Sideling Ground to the lowest Side, letting this Stake be in the Middle of your Cut, be it either of fifteen or twenty Foot, either of which are sufficient in Works of this Kind.
Here the use of the 10-foot pole as described seems incidental to its exact length, but the fact that an assistant may be expected to carry such a pole indicates that it was useful for other purposes(such as measuring the depth of waters no deeper than 10 feet).
A ten-foot pole also figures in a description of an attempt to save a person from drowning. From "Female Intrepidity," in the [New York] Ladies' Literary Cabinet (April 21, 1821):
As some children were amusing themselves near the mills of Mr. Hezekiah Chase, in Lynn, Connecticut, one of them, a girl of ten years of age, fell into the mill-pond. It was eight feet from the dam to the bottom, and the water near five feet deep. The alarm was first given to a man at the mills, who ran and extended a ten foot pole for her relief, but the tide had carried her beyond its reach.
Yet another use of 10-foot poles seems to have been in latter-day reenactments of jousting tournaments, evidently inspired by the romances of Walter Scott. That, at any rate, seems to be the background to this instance from "The Spirit of Chivalry: What After All Was the Eglintoun Tournament?" in The Casket (January 1840):
The Eglintoun tournament is over!—and the titled host has hit the Marquis of Waterford with a ten foot pole. No such strange occurrence with the latter we should think, though the noble performer has deemed it cheap at twenty thousand pounds; and all the editors in christendom have gone into extacies thereat. The Queen of Beauty has thanked him for it with her sweetest smile, and every lady that pretends to ton has drest a la Henri Quatre.
Early figurative use of "ten-foot pole"
The earliest instance I could find of figurative use of "touch [someone or something] with a ten-foot pole" is from "Buying Up the Press," in the [Lawrenceburg] Indiana Palladium (September 22, 1832, reprinted from the Missilonn Gazette), which uses the phrase in a very modern-sounding way:
How true is the saying that "a drowning man will catch at straws." Here we see men who a short time since would not have touched Webb, with a ten foot pole, welcoming him to their ranks, and declaring their belief that on him depends the result of the next Presidential election. Poor fellows! they calculate without their host this time.
A letter from Samuel C. Johnson of Pickens County, Alabama, dated May 4, 1839, in The Primitive Baptist (June 8, 1839) uses "ten foot pole" figuratively to indicate how far out of reach a person is from his enemies:
(Now this was all done after the final separation [of a congregation]. And now, brethren, who are the church; the 65 majority, or the 20 minority? I affirm that the 65 are the church; and the 20 a slabbed off part, that could not with all the power that they had in possession, have reached Petty with a ten foot pole. And here is the way our good Christians query me.)
Petty was Henry Petty, a Baptist minister accused of drunkenness while on a visit to Mobile, Alabama.
But Pertinax Placid, "Scraps from My Omnium Gatherum: My Great-Great-Grand Father," in the [University of Virginia] Collegian (June 1839) again uses the expression in the modern figurative way:
'I saw her eat.'
'No very unnatural occurrence I should think.'
'But she ate an onion!'
'Right my boy, right, never marry a woman who would touch an onion with a ten foot pole.'
I also checked various book and newspaper databases for the phrase "with a barge pole" to see how old that version of the wording is. The earliest relevant instance that came up was from "Capitalist Literature," in the Newcastle [New South Wales] Morning Herald and Miners' Advocate (May 5, 1887):
The extreme good taste, fairness of argument, and blushing modesty may be gathered from the concluding lines where it is inferred that it remains for us in New South Wales to furnish lower depths than Parnell or Labouchere, two men who would not touch the editor of the Spectator with a barge pole, or rather would not touch him without one.
This is 55 years after and an ocean away from the 1832 instance of "ten foot pole" in the Indiana Palladium. Nevertheless, there may be much earlier instances of both terms than I was able to find. In particular, the "barge pole" version of the expression may have its roots in Britain, where free, searchable databases of older newspapers are (as far as I know) unavailable.