This is gonna sound dumb, but I'm almost 40 and I've never had a cavity. I don't do anything special. In fact, I only brush once a day, in the morning. I never floss. I just won the genetic lottery. 23&me says I have gene that makes my bones about 50% more dense than normal. The downside is, I don't float. I can't tread water. I can keep my head above water for about 2 minutes but it requires a lot of work, I can't just relax and float like most people.
The really annoying part is every time, the dentist will bring all the hygenists in to look at my teeth because of how good they are for my age.