Before the germ theory of disease was developed, moralism was widespread. The plague? Punishment for our sinful behavior. New York City in the 19th Century faced frequent outbreaks of cholera, usually concentrated among the poor. City elders, newspaper editorial writers, medical doctors, and others frequently blamed this on the poor's poor morals, claiming it result from intemperate drinking, gambling, overeating, or other personal vices.
Now we know many diseases are caused by viruses, bacteria, or other microscopic infectious agents. But that does not mean moralism is behind us. Consider the moralism that accompanied the AIDS outbreak in the 1980s. And, of course, we see rampant moralism today regarding COVID-19. Many people say they would be ashamed to admit they were infected, as they expect to be judged and condemned. "Oh, you're sick? Well, I guess you weren't being careful. You probably spread it to others, too."
I'd love to read a book examining the history of disease moralism. It would be even better if it included some philosophical analysis of to what degree such moralism is warranted. It would be even better if it included analysis of how moralism perverts our thinking or renders us less able to fight disease.