Unfortunately bacteria reproduce and evolve much faster than we can, so for practical purposes we likely can't really genetically engineer our way out of this
The question is, when will humanity become wise enough to catch up with the technology? Probably never.
Wise enough, never.
Smart enough, we already are.
Sadly, we're not both at the same time and the results are in one of the Sci-fi books.
It would probably only take one or two generations to adapt, if the offspring dies before reproductive age - evolution is cruel, but it can be effective.
Evolution takes a lot longer than a couple of generations to make effective changes.