Eh, in the militaries of today's world time served matters as much as competence and standing out. A career officer who's competent, even if uninspired, will steadily rise in rank to Lieutenant colonel/commander over the course of their career. They may not get a command or a prestigious assignment, but a steady rise in rank is a given.
Even Reg Barclay, with all his flaws, made commander in Endgame's future. The only exception to this is really Picard's alternate life that Q presented with him being a lieutenant junior grade for 30+ years. Which just isn't realistic and I think was just a case of Q taking an exaggerated liberty to rub a little more salt into the wound.