ME/CFS aside, I personally can vouch for the connection between eating sugar-containing confectionery, snacks, soft drinks and tea or coffee, and tooth decay: when I was around 25, I started getting interested in health and fitness, and I conscientiously gave up sugar in my tea or coffee, switched to diet versions of any soft drinks I drank (rather than the sugar-containing versions), and cut down on confectionery, and bought diet versions of sweets if available.
So my sugar consumption was drastically reduced, especially by cutting out sugar in tea or coffee, as I used to have around 10 cups of tea or coffee during a working day, each with two teaspoons of sugar. So my teeth were literally bathed in sugar all day long.
Prior to giving up sugar at around the age of 25, each time I visited the dentist, often a new tooth cavity would be found, requiring a brand new filling. However, in the decades after giving up sugar at age 25, I never once had any more new cavities and fillings (sometimes an old filling would need to be replaced, but there were no new cavities to fill). Not a single new filling.
So that's my anecdote about the link between sugar and dental cavities. And
studies have found that the degree of sugar intake correlates with the amount of dental caries.
Sugar causes dental decay because bacteria in your month break down the sugar into acid, thus lowering the pH in the mouth. When the pH goes below a certain point (called the critical pH), then the tooth enamel starts to demineralize (ie, dissolve away).
Whereas when the oral pH is above the critical pH, then the tooth enamel remineralizes (builds up the thickness of the enamel).
I think artificially sweeteners are much healthier for teeth.