In a decade of working in the industry I have found this to never have been the case. Every promotion I've ever gotten except for maybe the first few gimme promotions was because I was on the radar of someone important enough to make that decision.
My first order of business at any company is to sort people into buckets of "they can help me" and "they cannot help me" and focus entirely on the first bucket. Those "after work beers" (or the remote equivalent) is where most of the work is actually done, imo. That is not to say I am without merit. But the assertion I am making is I could've probably bullshitted my way into even more positions if my moral compass was just a little bit more skewed.
I suppose changing the way you act around a certain person with power is a skill and the reward is the promotion. I know several people at or above my skill level that were promoted either later, or not at all, due to not realizing (or not caring) that merit means almost nothing. Of course, merit is what seals the deal - but "managing your manager" is more important than merit. Similarly, I've used a promotion of my own to put people I like on the right person's radar. It pays to know people. In this case, literally.
Of course, it's a meme now-a-days, that meritocracy is how you (don't) get promoted, which is what the parent poster is lamenting.
In my experience are most people who get promotions and most money, the ones who talk the most bullshit and shout the loudest. Especially people who just keep talking for talking sake and use a lot of abbreviations and tech terms, thus sounding like they know everything to management while in reality suck at everything, are quite common. One of my ‘colleagues’ in a company I consult for at the moment, is the head devops, he talks so much that I think he has some undiagnosed issue; he puts kubernetes ‘words’ (control plane, sidecar, compute mesh, bla bla) into every sentence even if we are not talking about devops at all. Then when he actually needs make a docker file, he fires up chatgpt and spends hours testing and finishing it. It’s his job ffs. And he got promoted over the other guy who I barely see and who actually does the work. They are 2 guys on the devops team so neither is supposed to be managing only or anything. It’s just one current example but all the companies I visit have a bunch of these and they are often more ‘respected’ than the skill and experience people, money wise. It is a reason why I made my own company and come in as a tech consultant instead; no use for this crap in my life; if they don’t pay my yearly inflation/market corrections, I just drop them. Clients enough.