I don't know about cheese and apples, but I think the logic behind sugarfree gum is that it makes you salivate and that helps to reduce the acids and other things that cause cavities in your mouth. My dentist told me that if you can't brush right after you eat, then at least try to rinse out your mouth after a meal. The worst damage happens during the 20 minutes after you eat.
I usually have a stick of trident after meals when I'm on the go. I floss and brush and see the dentist regularly and I haven't had a cavity in years. I don't know if it's the gum or just good hygene, but that's my two cents. I'd be curious about the cheese and apples though . . .
Hard fruits like apples kind of brush your teeth, as I understand it. They don't stick around like softer fruits do, and so are less likely to cause decay. Strawberries are an old-time tooth whitening remedy. Cheddar cheese, and other aged cheeses, like milk and also the sweetener xylitol (in sugar-free gum) have been clinically proven to inhibit formation of the plaque/decay bacteria.