Optimal pest control through catastrophes