When infectious disease transmission is density-dependent, the risk of infection will tend to increase with host population density. Since host defence mechanisms can be costly, individual hosts may benefit from increasing their investment in immunity in response to increasing population density. Such "density-dependent prophylaxis" (DDP) has now indeed been demonstrated experimentally in several species. However, it remains unclear how DDP will affect the population dynamics of the host-pathogen interaction, with previous theoretical work making conflicting predictions. We develop a general host-pathogen model and assess the role of DDP on the population dynamics. The ability of DDP to drive population cycles is critically dependent on the time delay between the change in density and the subsequent phenotypic change in the level of resistance. When the delay is absent or short, DDP destabilises the system. As the delay increases, its destabilising effect first diminishes and then DDP becomes increasingly stabilising. Our work highlights the significance of the time delay and suggests that it must be estimated experimentally or varied in theoretical investigations in order to understand the implications of DDP for the population dynamics of particular systems.