Propagation of chaos for a stochastic particle system modelling epidemics