The story was already circulating without Duell’s name attached. Quote Investigator’s earliest strong match is an item in The Electrician (December 1883, vol. 2, no. 12, p. 374) about a principal examiner who around 1843 “came to the mature decision that the work of the patent department must soon come to an end, because the inventive power of the human mind had reached its limit.”
A 1938 Esquire article by Frank Lane Brunton retold it with a “chief clerk” and set it in 1848. Dr. Eber Jeffery investigated the claim in the July 1940 Journal of the Patent Office Society and found no Patent Office official had ever resigned for such a reason, per Sass’s account of Jeffery’s work.
The Duell version in particular got a large modern push from advertising: the Conversable Economist notes 1985 TRW Corporation ads that quoted Duell saying the line “in 1899,” and Patently-O reports that Sass traced the printed attribution back to the 1981 book The Book of Facts and Fallacies by Chris Morgan and David Langford.