Would it be possible to make the cavity-causing bacteria in one's mouth go extinct?

I’ve had recurring duodenal ulcers ever since grad school, and blame my roommate, who had severe ulcers, for the Helicobacter pylori. We didn’t have very hot water in the apartment.

No I hadn’t seen it but OP asked about bacteria in a normal mouth, not genetically engineered ones. It is interesting. Of course I heard about the upcoming vaccine against the bacteria that cause tooth decay when starting dental school 29 years ago.

I was going to say something like this. Toddlers are constantly sticking their hands in their mouths. You’d need to monitor them 24/7 (they might put their hands in their mouths while they sleep, too) or keep them in a bubble to keep them from doing this kind of thing. That’s not going to be worth it from a cost/benefit perspective.

The child will ensure that bacteria enter its mouth on its own. Have you SEEN what babies and toddlers will grab and stuff into their various head-holes? (Don’t forget ears & noses – those seem to be considered suitable storage compartments for crayons and pennies.)

My cousin got an allergy to that.

Hands?

When I toddler I often stuck my feet in my mouth. And I refused to wear shoes most of the time.

I was using the Wikipedia meaning “An allergy is a hypersensitivity disorder of the immune system”.
As: “you may easily develop a hypersensitivity disorder of the immune system in response to proteins of your oral flora if your oral flora is replaced”

What should I have said?

Not sure, but a true allergy is not just a hypersensitivity, it’s an IgE moderated one. There are plenty of immune disorders that are NOT allergies, including some involving hypersensitivity (celiac, for example, is a hypersensitivity disorder but it is NOT an allergy. Even if people inappropriately refer to it in that manner.)

I suppose it’s possible to be allergic to your mouth flora, but that would be a dire situation indeed as you’d need constant medication, maybe even hospitilization, until they managed to eliminate it. I’d like a cite that that has ever actually occurred, and by cite I mean a formal diagnosis by a reputable medical professional, not something on some random internet website.