Oligarchy translates literally as "rule by the few" [1], and aristocracy as "rule by the excellent" [2]. Kakistocracy is "rule by the worst" per the featured article. So kakistocracy and aristocracy are opposites, and oligarchy describes something different: the number, not quality, of rulers.
Oligarchy means government by the few: https://www.etymonline.com/word/oligarchy (although today we tend to use it as a synonym for plutocracy, which is government by the rich). So the opposite of oligarchy would be democracy.
Aristocracy means government by the best: https://www.etymonline.com/search?q=aristocracy, so kakistocracy would be its strict opposite. In fact, it was probably coined for that reason, since the people who invented it would have known that "aristos" means "best" in Greek. (Edit: the Wikipedia page says that.)
The pre-modern sense of "best" in "aristocracy" has to do with being of the best class or, if you like, having the best breeding. It has nothing to do with individual quality, except insofar as praiseworthy qualities like "nobility" were traditionally associated with the nobility (making the point rather hard to miss).
There have been a couple of HN threads about Michael Young, the coiner of 'meritocracy'.
From the Economist (see the first of those links):
Young used the term pejoratively on the grounds that meritocracy was dividing society into two polarised groups: exam-passers, who would become intolerably smug because they knew that they were the authors of their success, and exam-flunkers, who would become dangerously embittered because they had nobody to blame for their failure but themselves.
Sounds just like 2020, no? If you generalize "exams" to "education", things exactly like that are being written today. Relatedly, the 1970s coinage "professional managerial class" is currently undergoing a revival (if there were a language market, I'd go long on that one).
1865, American English, probably from Dutch dialect pappekak, from Middle Dutch pappe "soft food" (see pap) + kak "dung," from Latin cacare "to excrete" (from PIE root kakka- "to defecate").
H.L. Mencken