Sequential infection with multiple dengue virus (DENV) serotypes is thought to induce enduring protection against dengue disease. However, long-term antibody waning has been observed after repeated DENV infection. Here, we provide evidence that highly immune Nicaraguan children and adults (n = 4478) experience boosting and waning of antibodies during and after major Zika and dengue epidemics. We develop a susceptible-infected-recovered-susceptible (SIRS-type) model that tracks immunity by titer rather than number of infections to show that boosts in highly immune individuals can contribute to herd immunity, delaying their susceptibility to transmissible infection. In contrast, our model of lifelong immunity in highly immune individuals, as previously assumed, results in complete disease eradication after introduction. Periodic epidemics under this scenario can only be sustained with a constant influx of infected individuals into the population or a high basic reproductive number. We also find that Zika virus infection can boost DENV immunity and produce delays and then surges in dengue epidemics, as observed with real epidemiological data. This work provides insight into factors shaping periodicity in dengue incidence and may inform vaccine efforts to maintain population immunity.