My research suggests that at least a strong influence on the use of '[done] to a fare-you-well' (also later '[done] to a fare-thee-well') in the sense of "[done] to perfection", with reference to food, was quite probably the generalization and colloquial adoption of the sense of 'farewell' in the earlier noun phrase 'farewell blow' used both half-literally (a metaphorical 'goodbye' or 'farewell' along with a literal stroke or blow that puts an end to something), and wholly metaphorically.
For the noun 'fare-you-well' (the earlier variant with the pertinent sense), OED specifies "U.S. Colloq.", and derives it from the verb 'to fare'. The verbal sense cross-referenced is
Used in imperative with well, as an expression of good wishes to a parting friend, or as a mere formula in recognition of parting....
OED provides, however, as the only definition of 'fare-you-well', its use in the phrase
to a fare-you-well: to the last point; to the utmost degree; completely.
The OED's earliest attestation, from the 1886 (1884 copyright date) publication of Dr. Sevier (George W. Cable) is surprisingly infirm but, finally, perhaps justified. The attestation is
And then it means a house.., and milk, anyhow, till you can't rest, and buttermilk to fare-you-well.
That version of the quote, from the 1886 standalone publication, differs from the earlier (1884) version of the story as published in the September 1884 (copyright date 1883) edition of The Century Illustrated Monthly Magazine, where it appears with a comma between "buttermilk to" and "fare-you-well".
The complete context, however, suggests the interpretation given by OED may be correct, regardless of what might be either editorial insertion or deletion of a comma, because the passage is devoted to various expressions of finality:
..."'My day's work's done,' sezee; 'I done hoed my row.'". A responsive neigh came out of the darkness ahead. "That's the trick!" said the man. "Thanks, as the felleh says." He looked to Mary for her appreciation of his humor.
"I suppose that means a good deal; does it?" asked she, with a smile.
"Jess so! It means, first of all, fresh hosses. And then it means a house what aint been burnt by jayhawkers yit, and a man and woman a-waitin' in it, and some bacon and cornpone, and may be a little coffee, and milk, anyhow, till you can't rest and buttermilk to, fare-you-well.
With the comma (and correction of "to" to "too"), 'fare-you-well' in the passage seems to have interjectory force, with the meaning being "that's it" or "that's all". Without the comma (the later version), the meaning of 'buttermilk to fare-you-well' seems to be something like "buttermilk to put you right" or "buttermilk to top it off".
Although OED doesn't attest the appearance of the sense again until 1910, I find it twice in 1892 with a meaning approximating 'a final blow':
The bar-keeper was smacked in the face with a rock and had his mug badly disfigured. A side partner also received a "fare you well" in the nose and went to sleep.
The Sedalia Democrat (Sedalia, Missouri) 10 May 1892 [paywalled].
As is usual in Kansas City the visitor carried with him the sympathy of the audience, and when he was tried out in the latter end of the race [a shooting match] he was encouraged to a "fare-you-well," every kill being applauded. The shooting as a whole was considerably below par.
Forest and Stream, December 1892.
Subsequent to those 1892 appearances, the phrase begins to be used frequently with the general sense of 'to finality, to the end, to perfection' in various contexts in the popular press: horse-racing (1893); sale prices for clothing (two distinct uses in 1894, with repetition of one in early 1895; another in 1896); commercial enterprise successes (1894); the beating of tenor drums (1894); methods of nominating candidates (1895); legal battle (1896); the fate of Coleridge's Ancient Mariner after the shooting of the albatross (1896); a commercial success (1896); brasswork polish (1896); commercial successes generally (1896); football center position play (1896); explanation of mysterious matters (1896); Republican party resolutions (1896); and etc. into the next century.
Noting the similar but earlier figurative and semi-literal uses of 'farewell blow', a phrase used with comparable frequency in the US and the UK to mean 'a blow or another action that completes [something]', I investigated those uses.
I found the phrase in use throughout the 1800s. Many appearances in the later 1800s were in a widely reprinted (in the U.S.) story about a miner discovering the "Welcome Stranger" gold nugget in Australia. The story was first printed in 1884, and appeared throughout 1885 into 1886:
The Welcome Stranger. — Down in their mine three disappointed gold diggers looked gloomily around, with a kind of sulky regret at having to leave the scene of so much useless toil. "Good bye," said one, "I'll give you a farewell blow," and raising his pick he struck the quartz, making splinters fly in all directions. His practiced eye caught sight of a glittering speck in one of the bits at his feet.
Tid-Bits, November 8, 1884, reprinted from Cassell's Saturday Journal.
The 'farewell blow' in this story is a blow that precipitates success. So also are many of the other literal or figurative 'farewell blows', in popular and other literature, completing blows that bring at least a partial triumph or success. Aside from the obvious, wherein a half-literal 'farewell blow' is a literal blow that finishes a conflict with the triumph or success of the thing or person inflicting the blow — the same underlying sense of 'triumph or success in completion' found in many early uses of '[to a] fare-you-well', as well as in the later culinary sense of 'done to a fare-you-well' used with the meaning of 'done to perfection' — the context of figurative uses of 'farewell blow' usually connotes "the completing or perfecting action".
She seemed to feel that ruin was approaching, and to meditate the most certain course of striking a farewell blow, of deadly rancour, to the heart of her adversary.
An Old Family Legend, James Norris Brewster, 1811.
He shall lift up his heel; this being the most distant part of the body, represents the last stroke which Judas was then meditating to inflict upon him at parting, as a farewell blow, which was no less than to to deliver him into the hands of his enemies.
The Life, Doctrine, and Sufferings of our Blessed Lord and Saviour Jesus Christ, Henry Rutter, 1845?.
We saw one poor fellow who had lost his pole in giving a farewell blow to the remnant [of an effigy of Judas Iscariot] when it was dragged from the shore; and who, while returning up the shingly beach, happened upon a small piece of board that had formed part of it. "What," he exclaimed, "you accursed dog, are you still following me? Wait a bit," and sitting down, he placed the board before him, and with a couple of stones patiently battered it to pieces.
Sixteen Years of an Artist's Life, 1859 (London).
...and Bush gave Dodge a farewell blow with the billy, which may have been meant for a fatal one, as it was accompanied with the remark that "dead men tell no tales."
Chicago Tribune (Chicago, Illinois), 05 Oct 1863 (paywalled).
Hot words, in sooth, Messrs. McCallu, but not less spicy are those with which you deal your farewell blows to poor Pinkerton: "In his nauseous tract we decline to follow, for even here victory were disgrace, and the laurels like those acquired in wrestling with a chimney sweep."
The Irish Builder (Dublin, Ireland), 01 Oct 1879 (paywalled).
In all of these (and other) uses of the standard phrase 'farewell blow', that phrase may be replaced without loss of meaning with the colloquial 'fare-you-well'.