On the distributional consequences of epidemics