A paper called "Steroid 5a-Reductase Deficiency in Man" published in the December 1974 issue of Science starts out with the statement:
Significant progress has been made toward defining the role of androgens in sexual differentiation and development in the past 25 years.
The paper is a report of a study of 24 XY persons in a town called Salinas in the Dominican Republic with a disorder of male sex development that the authors of the paper determined results from a deficiency of steroid 5a-reductase, aka 5-ARD. This is the same DSD that Semenya has. Presumably Niyonsaba and Wambui have it too because in 2019 they both said they have the same condition as Semenya.
The paper goes to say:
The birth defect is limited to incomplete differentiation of the male external genitalia; masculinzation of the internal structures is normal. At puberty, virilization occurs with the exception of scanty or absent beard, lack of temporal recession of hairline, and a small to absent prostate. Because of the virilization at puberty, and despite marked ambiguity of the external genitalia at birth, we hypothesized that the affected individuals would not have a disorder of testosterone biosynthesis.The male puberty without breast development and with complete spermatogenesisalso precludes a defect due to impaired androgen action.
[Our] studies demonstrate [that these persons have] a defect in 5a reduction resulting in the decreased conversion of testosterone to dihydrotestosterone. Whether the bio-chemical error involves the synthesis, structure, or metabolism of the enzyme A4-steroid 5a-reductase is not [yet] known.
The anabolic events at puberty, in particular the increase in muscle mass, the growth of the phallus and scrotum, and the voice change, appear to be mediated by testosterone and occur in the affected males.
Psychosexual orientation (post pubertal) is male, and this is of considerable interest, since the sex of rearing in 18 of the  affected males was female. Despite the sex of rearing, the affected were able to change gender identity at the time of puberty.They consider themselves as males and have a libido directed toward the opposite sex. Thus, male sex drive appears to be testosterone related and not dihydrotestosterone related, and the sex of rearing as female, appears to have a lesser role in the presence of masculinizing events- testosterone exposure in utero and again at puberty with the development of a male phenotype.
Again, this paper was published in 1974 - nearly 50 years ago.
Moreover, it wasn't published in an obscure journal read only by a handful of academics working in esoteric areas. It was published in Science, the flagship peer-reviewed journal of the American Association for the Advancement of Science (AAAS). In the 1970s just as today, Science was one of the world's most widely circulated and read journals amongst the general public interested in scientific and medical matters.
So not only was a great deal known about XY DSDs in general 40-50 years ago, quite a lot was known about the specific DSD that Semenya has, and which Niyonsaba and other XY athletes competing in women's athletics today are also believed to have.