I won't disagree that medicine has come a long way but I'm going to say that this is a giant disservice to some very great doctors in history.
My favorite example is John Bradmore, who saved the life of King Henry V after he was shot in the fucking head with an arrow. Not only was John Bradmore a surgeon, he was also something of metalworker (and in fact, was arrested for making counterfeit coins; he had to be pulled out of jail to save the king's life). He used that skill to design a bespoke tool to pull the arrowhead out of the king's head, creating an antibacterial environment with honey and disinfecting the wound with alcohol (though this was before germ theory). Henry V would later go on to rule for 19 more years (he would die for seemingly unrelated reasons, heatstroke). By the way, this was in 1403.
There's also a problem with your criticism in the sense that it implies that doctors were blindly confident, and not for a particularly good reason. While obviously certain incorrect beliefs persisted for quite some time in history, it's from within medicine and from other doctors that these views were more often than not corrected and updated. Obviously, Galen believed incorrectly that the human heart has sinuses from which blood flowed across and was filtered, but to his defense he was not allowed by the state to perform human dissections. If anything, the neo-Galenists were to blame (as Andreas Versalius so often harshly criticized, to the detriment of his Latin grammar, funnily enough). But it's only through the work of people like Ibn al-Nafis, Vesalius, and William Harvey (the latter two's frustration with Galen comes across pretty clearly in their writing) that we have the perspective to say that beliefs like Galen's were wildly off the mark. What I mean to say is, that it's very easy to say that those early doctors were far too confident in their pseudo-scientific theories, yet that's the nature of scientific knowledge and the epistemology of medicine; we know better only because of social changes, technological improvements, and/or particularly clever insights.