This is a wild question, but I think you’ll find if you google it, you’re not the first person to ask.
From what I can gather (take this with a healthy bit of salt)- toothpaste and mouthwash can have calories and the amount varies depending on brand. However, each “serving” of toothpaste and of mouthwash is probably like 2-4 calories.
So the minuscule amount that you might be swallowing would probably be fine. Unfortunately, the research on autophagy and how many calories it takes to break it isn’t extensive enough to really answer your question.
Some will say ANY amount of calories will break autophagy. Some say you’re fine if you’re under 35-50 calories. Some say it depends on the nutrients involved more than whether or not you have a tiny tiny amount of calories.
A root canal or blood infection isn’t a worthwhile trade off to the benefits you might be getting from autophagy though. Gum surgery because you don’t take care of your mouth is definitely not worth it either.
I will say that I hope this is just idle curiosity, I certainly found it an interesting question, which is why I started googling, but just as an academic question.
If you’re seriously concerned about this, you’re definitely in eating disorder territory and not being healthy about IF.