It’s untrue that natural selection always guides pathogens to be less lethal.
This is covered in ch. 64-66 of Quammen’s “Spillover”, which covers a seminal paper by Anderson and May[0] considering the case of myxomatosis.
Here’s some salient quotes:
Laboratory experiments showed that all field strains produced lesions that provided sufficient virus for transmission to occur,” he wrote. But the strains of very high virulence (grades I and II) killed rabbits “so quickly that infectious lesions were only available for a few days.” The milder strains (grades IV and V) produced lesions that tended to heal quickly, he added—and then the payoff, “whereas strains of grade III virulence were highly infectious for the lifetime of the rabbits that died and for a much longer period in those that survived.” Grade III, at that point, was still killing around 67 percent of the rabbits it touched. Myxoma virus, thirty years after its introduction, had found this level of virulence—being pretty damn lethal—to maximize its transmission. It was still capable of killing most of the rabbits it infected, but capable also of assuring its own survival with a continuous chain of infections.
The first rule of a successful parasite? Myxoma’s success in Australia suggests something different from that nugget of conventional wisdom I mentioned above. It’s not Don’t kill your host. It’s Don’t burn your bridges until after you’ve crossed them...
...they[Anderson and May] plotted a relationship between virulence and success. Their result was a model-generated prediction: Given this rate of transmission, given that rate of recovery, given those unrelated mortalities, then . . . an intermediate grade of virulence should come to predominate.
Son of a gun, it matched what had happened.
[0]: https://www.cambridge.org/core/journals/parasitology/article...