Earlier quoted context omitted.
I think you're underestimating humans who for hundreds of thousands (!) of years have been as smart as you and I.
Being smart and knowing stuff are not equivalent. The smartest person alive 300 years ago had no clue about bacteria and viruses. Or anything like horizontal gene transfer. Sure, they were not stupid . They still did not know a lot of things, which occasionally made them do stupid things. For example, it is well documented that people believed diseases were transmitted by “bad air” (i.e. pestilence, or bad smells) up…
But that's not particularly stupid. Bad smells are certainly a proxy for diseases to some extent and avoiding them/removing their sources would also decrease the likelihood of getting sick.