In a non-sustainable, "over-populated" world, what might the use of nanotechnology-based targeted, autonomous weapons mean for the future of humanity? In order to gain some insights, we make a simplified game-theoretical thought experiment. We consider a population where agents play the public goods game, and where in parallel an epidemic unfolds. Agents that are infected defectors are killed with a certain probability and replaced by susceptible cooperators. We show that such "nanowars", even if aiming to promote good behavior and planetary health, fail not only to promote cooperation, but they also significantly increase the probability of repetitive epidemic waves. In fact, newborn cooperators turn out to be easy targets for defectors in their neighborhood. Therefore, counterintuitively, the discussed intervention may even have the opposite effect as desired, promoting defection. We also find a critical threshold for the death rate of infected defectors, beyond which resurgent epidemic waves become a certainty. In conclusion, we urgently call for international regulation of nanotechnology and autonomous weapons.