cupoftea - You are missing three points.
First, no matter how many hours a person has, or whatever their seniority number is, if they are not up to standard and can't pass a command course then they will be overtaken by people who are junior to them, in order of seniority, which is fair.
Meritocracy in aviation is a very subjective thing, one mans ace is another mans idiot. If one person is genuinely way ahead of their contemporaries they will usually seek work that utilises all their expertise which may involve test flying, training, VVIP positions etc.
Having become a captain, regardless of age, one is required to maintain the necessary standard, (equal to the senior physician), and will be checked frequently to ensure this, one is not required to be an ace as the standard is expected to cover all eventualities, (unlike the junior physician).