Yes, Memory Alpha says it, but where did they
get that information? I can't find any dialogue in the episodes
to support the 22-year-captaincy idea. I know it's a behind-the-scenes idea, probably from the TNG Writer's Bible that fans take as "canon", but it's just fanon, alongside other fanon ideas such as Spock being the first Vulcan in Starfleet or gold-pressed latinum being "unreplicable". I mean, the same Writer's Bible had Data as an Asian-looking android built by aliens, and a first officer named William "Bill" Ryker. So the Bible isn't the best source.