Thinking about meritocracies, here's a counter-example from real life.
My ex's grandfather was the last hereditary vizier to the king of Bhavnagar, part of what is now the state of Gujarat in western India. Gujerat was never formally part of British India, and is separated from much of the rest of India by the Rann of Kutch (very inhospitable desert), so it has its own language, culture and history.
The setup there was that members of this particular family always brought up one of the sons at court, working alongside his father and learning exactly how everything worked and who everyone was, and how to be head of the civil service/chief economic advisor/finance minister. It wasn't a particularly grand position. It came with a family house in the middle of town, but nothing special -- not a palace or anything like that.*
That's apparently pretty much how it still works today in the Gulf States and Saudi, too, with which Gujarat shares a lot of history, and in Gujarat it seemed to have worked reasonably well -- it was always a prosperous place, barring droughts.
*ETA: I realise it sounds like the Arabian Nights, but to look at it from a comparable perspective, when I was part of the family, so only one generation after Independence, back in Bhavnagar the family were all upper-middle-class professionals, civil servants and managers. Successful and comfortably off, yes, but not wealthy.