Saying "because it existed previously [therefore it is more valid]" is a poor argument, and ignores the current common law system which has used gender & sex interchangeably.
Also, it sounds like the "history you were taught" failed to mention the separation of gender & sex is a relatively new idea in modern times[1]—and ignores biology, which is anthropologically disingenuous.
> throughout most of history (and even on most legal documents), Gender = Sex
Which is literally not true.
> throughout most...most legal documents
He's not saying all, he's saying most—which is true. Native Americans didn't quantify gender but they also didn't have legal documents, which in common law countries and their predecessors used gender and sex interchangeably.
https://en.m.wikipedia.org/wiki/Third_gender
While gender and biological sex can be disconnected under certain conditions for the majority of the population this is not the case.