As always, the best humor in the Internet is Top5.
I frequently use a variation of the trope “I’m not a doctor, but I do play one on television.” Mine is, “I’m not a computer expert, but I did play one on television,” for a decade on the PBS Show Computer Chronicles.
In an effort to discover the etymology of the phrase I discovered a roaring controversy… well OK, a whispering one.
Here is the official version, but let me note that I am calling it false, without having the truth. I just know the trope was around before 1971, when my WTBS colleagues created a commercial for Damitall which began, “I’d not a doctor, but I do play one on television, and I’m being paid to ask you this important question…” Most of the humor in the show was borrowed and ancient, so I figure the trope was around in the 1960s.