The first recorded uses of "meritocracy" are apparently by Marxist sociologists in the 1950s. They used it to describe a dystopian society, where merit serves as a moral justification for social classes, and social class determines the opportunities available to gain and demonstrate merit.
Of course the idea that career success and influence should be based on demonstrated ability and effort is ancient. But once you start building a society based on that idea, you run into Goodhart's law.