The earliest record I can track of the use in print is in the novel Titan:A Romance, by Jean Paul Richter, published in translation from the German in 1863 and in the original language between 1800 and 1803.
Several sections of the text refer to a gentleman's frustration at the loss of his ear trumpet:
'"My ear, madam," he continued, "cannot be found again at all among the domestics; I have that to tell you." For he had today posted himself upon a law-giving Sinai, and thundered into the ears of the service assembled at its foot the inquiry after his own ear, "because I must believe," he had said to them, "that you, for very good reasons, have stolen it from me."
'He saw through all, heard all, though they had his away his ear-trumpet.'
the saga continues later in the book
'her astonishment can be compared with the greater astonishment of her
husband, who happened to have been screwing in in the third chamber
his tin ear, -made by Schropp of Magdeburg,- in order to listen to the
servants, and who now caught a number of things. Nevertheless, the
double-ear, with the broad meshes of its nocturnal lark-net, had only
fished up from Augusti's low, whispering, courtly lips single, long,
proper names, -such as Roqairol and Zesara.' Hardly had the soft
spoken Lector gone out, when he stepped gayly into the chamber, with
his ear in his hand and demanded of her a report of the reports.
First he inquired,- for he had been listening in vain,- in a very exasperated manner, of the Minister's lady, where she had stowed away his ear (it was the tin duplicate ear, wherein, as in a Venetian' lion's-head, all mysteries and accusations of the whole service and family met);...'
From this it seems clear that the American translator, Charles Timothy Brooks, was comfortable with the idea that his readers would understand the varied references 'tin ear' to refer to the same device as 'ear'and ear-trumpet'. I have no german so I'm not able to go to the original text to see what liberties may or may not have been taken with the translation in that regard. If anyone else can compare texts I'd be happy to hear and incorporate the results.
Seeing @RaceYouAnytime's answer, I thought it might be worth exploring whether it is the case that while 'tin ears' were ear trumpets, not all ear trumpets were 'tin ears'.
It is quite easy to picture the very obvious ear trumpets which we have all seen in cartoons and comedies, but there were also designs for small, discreet devices and the more money you had the fancier they could be.
This example is from 1830 and is described as an 'Artificial concha'
Bernard Becker Medical Library Image Gallery: This delicate hearing device is molded of silver and gold plated and was molded to fit each individual user. It is lightweight (only 0.8 ounces) and can stay in the ear unsupported. The 2-3/8 x 3/4 inch opening is covered by a decorative filigree grill. The outer face of the device is a carved shell shape. Though designed to be barely visible when worn, this piece is beautifully crafted.
This device called an Otophone, was designed to make the wearer's ear stick out and dates from 1860.
This small curved silver device was designed to make the ear protrude slightly to facilitate the collection of sound waves.
pair of gilded ear trumpets made by F C Rein, London c1850
All of these are devices are 'worn in', rather than 'held to' the ear and I would speculate that it could be something of this nature which people were thinking of when giving the alternative name 'tin ear' to a cauliflower ear, particularly when considering the Titan reference to screwing in the device..