Agreed. Even the most insensate and mercenary calculation would be deficient in neglecting those populations who cannot afford modern treatments. Not only are transmissible pathogens indifferent to such distinctions, but there is also the matter of incubation of novel diseases and development of resistance to drugs. It won't do to restrict attention to the transmissible case either since many non-transmissible diseases condition the epidemiology (and evolutionary milieu vis a vis drug resistance) of the transmissible ones. In a sense we are assisting the microbial enemy by suffering rich and poor to coexist in close proximity, since some drugs will inevitably find their way into such incubators. We might as well email North Korea blueprints of our ICBM interceptors.
It's difficult to be optimistic, but fatalism plays into the hands of the enemy. I try to fight it but sometimes I need a reason to say to myself, "I'm glad I'm old".