Well yes, and that is obvious today, at the time they were reputable fields, just look it up.
And if you read that in history, what does that tell you about the present and the possibility of it being the case with some fields today?
My point is obviously not to defend those fields, but to say that pseudoscience maskerading as science isn't a thing that can only happen in the past.
It's a bit strange to learn about the fact that it happened before yet not accept the possibility that some of the things we call science today, aren't.
This depends a lot on what you means by "eugenics". Some people use the word to be a normative word (a statement about what should be) others positive word (a statement about what IS or could be). E.g. "We can use CRISPR and genetic screening to make people resistant to HIV" vs "we should do so".
The former is a question of fact ("is this possible?") though often with a bunch of unspoken subquestions ("can we do this change without causing incidental genetic changes or damaging the egg?") and in the realm of science while the latter is a question of policy and feelings (how much do we want HIV resistance? What is the price we're willing to pay/risk we're willing to take? Does deliberately altering humanity open a can of worms best left unopened?).
Conflation between normative and positive meanings are quite common across a wide variety of domains and can cause substantial confusion as two people can think they're talking about the same thing but actually aren't.
Even in the "should" case there's a bunch of confusion as to what sort of things should count as "eugenics", with some people wanting the term to apply only to coercive measures and others wanting the term to apply to any deliberate changes to a population's gene pool (and theres the grey area in the middle where financial incentives happen).
Note: A lot of politically fraught words will have a number of similar but different meanings as various interest groups fight over them. From "war" and "violence" to "culture" and "science" to "person" and "rights".