Sort of.
In some ways, it can be looked at as a mild factor in evolution pressure. But there are other ways to achieve a degree of immunity within a population without killing off the weak susceptible which was a factor in smallpox and milkmaids. While cowpox offered immunity to dairy...