As used in the following sentence:
Another trick a lot of top-flight engineers use is clipping the signal before the limiter, to reduce the work the limiter has to do to peaks.
Eric Partridge, Tom Dalzell & Terry Victor, The New Partridge Dictionary of Slang and Unconventional English, volume 2: J–Z (2006) asserts that the term "top flight" in the sense of "first rate" arose in 1939:
top-flight adjective first rate US, 1939 • You stack up as a top-flight man in my book, but you've had not [no, in the original text] incentive here. — Jim Thompson, The Grifters, p. 121, 1963.
But this 1939 origin date for metaphorical use of "top flight" in the sense of "top of the line" is off by at least 83 years.
An early metaphorical use of 'top flight' and one early literal sense of the term
An Elephind newspaper database search finds instances of top flight going back to the middle of the nineteenth century. From a notice about the publication of Cockburn's Memorials, in the New-York Daily Tribune (July 1856):
Read Cockburn's Memorials then, for bright, lively sketches of the days when Edinburgh was a capital—when the best Scotsmen were to be found here, talking their best—and when there was just enough antagonism between Whig and Tory to keep intellectual life awake and in motion always. Lord Cockburn was a Whig or as Lockhart said in reviewing his Memoirs of Jeffrey in The Quarterly, 'an Edinburgh Whig of the top flight,' but he does full justice to the Tories, too."
The real-world antecedent for the metaphorical sense of "top flight" here is unclear, but instances in the late 1860s of "top flight" in the sense of "uppermost flight of stairs" lend support to the possibility that it may be the source of the idiom. From "A Serious Fall," in the [Hobart, Tasmania] Mercury (August 19, 1867):
At a little after eight o'clock last evening, a laboring man named William Harding, aged 60, missed his footing, and fell down the top flight of Kelly's Steps. He was picked up by the police and convoyed to the General Hospital, where it was found that he had sustained a severe lacerated scalp wound, about two inches long on the top, and a contused wound on the back of the head.
That U.S. English used top flight in the stair sense, too, is clear from S. Plesse, "Why Run Up Stairs?" in the Perrysburg [Ohio] Journal (October 23, 1868):
We do not run in the street, nor in the park or garden; why then run up stairs, and then complain that the stairs are so high? It is difficult to answer this question; nevertheless English people generally do run up stairs, while foreigners are well satisfied with walking up. ... Walk up stairs slowly; rest at each landing; again walk steadily; and you will reach the top flight without exhaustion or fatigue.
An "apartment to let" advertisement in the Sydney [New South Wales] Morning Herald (February 2, 1883) suggests how "top flight" might have been understood as "most desirable":
To LET, elegant front ROOMS, top flight Kidman's-building; use of elevator. Little & Co., photograp[h]ers.
Once elevators provided effortless access to the upper floors of multistory buildings, the desirability of quarters at the top flight undoubtedly increased. Still, I am not convinced that "top-flight" owes its existence as a metaphor for highest-class to sets of stairs.
Nineteenth-century metaphorical use of 'top flight', mostly in Australia
A metaphorical instance of top flight in the context of sport appears in "Turf News," in the *[Sydney, New South Wales] *Referee** (August 9, 1888), originally appearing in the "Indian Planters' Gazette":
"Prospects of first-class racing in India, during the coming season, scarcely look as black as was prognosticated early in the year. The safe landing of Moorhouse; the purchase by Lord William Beresford, shortly after his arrival in England, of Fullerton, a horse certainly very nearly among the top flight, and by many pounds the superior, of any English horse ever yet imported into India, show that the big wigs of our turf mean business. ...
The wording here ("among the top flight") is strikingly different from the wording of the 1856 instance ("of the top flight"), and I don't see how "top flight of stairs" makes a very suitable reference for it. In fact, something along the lines of "top flight of arrows" might make more sense for something said to be "among" the flight.
Then comes another sporting instance, from Tim Whiffler, "Sporting Notes," in the Wagga Wagga [New South Wales] Express (September 21, 1895):
It is a matter of history that when the Chipping Norton team of racehorses were submitted to auction last autumn, the biddings for Hopscotch were not sufficient to tempt Mr. W.A. Long to part with him, that gentleman stating at the time that 1200 guineas was the reserve placed on the son of unbeaten Grand Flaneur. Viewed by the light of his recent top flight performance, Mr. Long is doubtless pleased that no one closed at the time with his offer, and more so no doubt when the horse's excellent Caulfield Cup [in Melbourne] prospects are considered.
And again, a month later but halfway around the world from Wagga Wagga, from "Counter Tenor's Prize: Col. Ruppert's Colt Wins the Jerome Handicap," in the [New York] Sun (October 27, 1895):
Col. Ruppert's good three-year-old, Counter Tenor, won the Jerome Handicap at Morris Park [in Westchester County, New York] yesterday afternoon in commanding style, running the mile and a furlong in 1:54 and finishing with so much speed in reserve that there is no doubt as to the colt's class. He is in the top flight especially with weight up and over a distance of ground.
Moving away from horse racing, but returning to Australia, we have this instance from "No. 1 North Oriental and Glanmire," in the Brisbane [Queensland] Courier (August 29, 1898):
The eagerly-looked-for return from the No.1 north Oriental and Glanmire crushing was made public yesterday (says the "Gympie Times" of Saturday), when the official figures showed a yield of 1760oz. retorted gold from 259 tons 17ct. of stone. ... The proceeds, which are to be smelted this morning, have an estimated value of about £7000, of which £4800 is to be divided amongst the lucky shareholders at the rate of 2s. per share, and £1500 is to be carried forward to credit towards future expenses. As a maiden effort this stands amongst the top flight of great results, which the field is responsible for, and is especially noteworthy as coming from the deep ground (over 1000ft.) which is now being developed in the north-eastern portion of the field.
From "The Gourlay Musical Comedy Company: Kalgoorlie Season Begins To-night: A Chat with MR W. Gourlay," in the Kalgoorlie [Western Australia] Miner (October 11, 1898):
Well, when I went to America (I was about 18 years old at the time), I figured in musical comedy, then showed in drama, burlesque, and everything of the kind that it is possible to play. It was a good schooling that I got in the profession in America, and I had the good fortune to ba associated with players of the top flight. After a couple of years in America, I travelled back to England, and right away got into good going again.
From "Point," "Queensland Notes," in the *[Sydney, New South Wales] Referee* (October 12, 1898):
The special function of the National [Cricket] Union is to foster and encourage Junior cricket, and in so doing should, of course, act as a feeder to the senior association—the Q.C.A. [Queensland Cricket Association.] Now hat do we find? Quite a score of capable players, who, if not actually in the top flight, are very adjacent to it, are playing cricket in the ranks of the N.C.U. while the electorate in which they reside are in consequence forced to play Juniors in their teams.
From "Safety," "Sporting Intelligence: Cycling," In the Bendigo [Victoria] Advertiser (November 26, 1898):
An old English professional says — "The salaries and bonuses received by the English racing men who are in the top flight are by no means so large as many people are led to believe. With the exception of half a dozen riders, such as Cordang, Betts, Chinn, etc:, there is not a pro. drawing 5 a week for tyre and machine retainers, while many good men are receiving only about 30s a week. ...
And from "Cycling: The Championship Race Meeting," in the Sydney [New South Wales] Morning Herald (September 29, 1899):
Probably never since the institution of the reciprocity agreement between Queensland, Victoria, and New South Wales has so much interest been shown in the Australasian championship to be contested during the afternoon. This is no doubt caused by the fact that many of the prominent members of the [Cyclists'] union have during the season just closing developed into riders of undoubted ability, while the representatives from the other colonies are men who stand at the top of the tree. ... The mother colony, however, has a tip-top flight of riders to battle for it in New, Delissa, tho Longmuir brothers. Clark, Gillies, Bell, and Maidment, who have often shown their form; ...
Although the first match for "top flight" in the relevant sense that an Elephind newspaper database search finds is from the New-York Daily Tribune (in 1856), the source of the quoted language is The Quarterly, a British review. Subsequent nineteenth-century metaphorical use of the term is concentrated (in Elephind results) in Australian newspapers, starting in the late 1880s. The Elephind matches also tend heavily toward sports usage—horse racing, cricket, and cycling—but also extending to business (specifically, returns on investment in a gold mining speculation) and musical comedy.
The horse racing context yields matches for instances originating in India (1888), Australia (1895), and the United States (1895), which leads me to suspect that the the original source of this usage may actually be British. Unfortunately, Elephind searches U.S. and Australian newspaper databases, but not British ones, so my suspicion is purely inferential. (The primary British newspaper database that I'm aware of—the British Newspaper Archive](http://www.britishnewspaperarchive.co.uk/)—supposedly permits users three free searches of its archives after no-cost registration, but I haven't tried to register there.)
Whatever the place of origin, literal sense of "top flight" from which the figurative usage arose is uncertain. "Top flights" of steps certainly existed and were referred to as such in the middle 1800s. But if it were the source of the figurative usage, the likeliest preposition to precede it (in my opinion) would be on, as in "X is on the top flight of Y"—much as we tend to say "X is on the top rung of Y." What we find instead is that the preceding prepositions in the seven nineteenth-century Elephind matches with that construction are of (twice, in 1856 and 1898), among or amongst (twice, in 1882 and 1898), and in (three times, in 1895, 1898, and 1898). The image is of belonging to a class (or flight) of superior individuals, not of occupying or commanding a position at the top of a figurative staircase.
I assume it derives from the fact that many competitive endeavors - amateur golf, for example - have 'flights' that segregate similarly skilled competitors. The top flight for golf might be, say, scratch (par) to 5 index, then a 6 - 10 index, etc., 11-15 and so on.
I think here's why topflight, according to M-W and others, mean:
of, relating to, or being the highest level of achievement, excellence, or eminence
Which is coincidentally the time when Top Flight, the famous racehorse, came to media attention. From Wikipedia
Top Flight (April 15, 1929 – 1949) was an American U.S. Hall of Fame Thoroughbred racehorse. She was the leading American filly of her generation at two and three years of age.
It's also possible that the horse was named after the phrase became popular, but I think it's highly unlikely.