When did "Publish or Perish" first become a thing?
In mathematics, in the U.S., until the 1950s it was almost entirely the case that math departments were service departments to engineering and chem and physics. Teaching loads were high, and there was no expectation of "research" at all. Some people with M.S.'s were faculty, and some people with PhD's had "done no research" except their thesis.

In the early-to-mid 1950's, coinciding with the post-sputnik, post-Hiroshima era, apparently many math depts argued that individuals' teaching loads should be greatly reduced... so they could conduct research that would help "beat the commies" or whatever other enemies... and, concommitantly, they'd need lots more faculty lines.

Of course there was a boom time, perhaps of a decade or two, but then the pretense caught up with us all. E.g., Michael Spivak's multi-volume book(s) on differential geometry were published by "Publish or Perish" press.

Nevertheless, at a relatively high end of things, even into the 1980's, in math, in the U.S., it seemed and does still seem to me that people were judged more by their scholarship, reputation, insight, etc., than by paper-count. Yes, part of this was the considerable difficulty of creating a readable document pre-PDF, pre-TeX, pre-most-things. And, yes, pre-internet. Presentations at conferences, even without associated preprints, could make a person's reputation.

Many breakthrough results were first made public at conferences (in the lack of arXiv or internet generally), and, again, such stuff was what reputations were made of. "Publications" were mostly after-the-fact.