I read the recent article in Dive Training, and understand how defogger works. It's explained nearly everywhere as "like wax on a car."
Actually, defog works almost exactly *opposite* how wax on a car works. A well-waxed car has a nice hydrophobic coating, which prevents it from being wet by the water. The surface tension of the water makes the water bead up, and it runs off. Defog works in the opposite direction. It works as a surfactant, reducing the surface tension of the water and helping the water wet the surface. A thin film of water is completely transparent, while microscopic beads of water are... yep... the fog on a fogged mask.
If you read the bottle of Rain-X, it expressly states that it is *NOT* for use on the inside of your windshield. Why? Because applying it to the inside of your windshield would make your window fog up much more easily. On the outside, there is enough water to coalesce into drops large enough to be blown off by the wind. On the inside, condensation would form microscopic droplets which would not be large enough to fall by gravity alone (and there's no wind on the inside of the windshield). The company that makes Rain-X actually also makes a windshield defog, which like scuba defog, is a surfactant, not a hydrophobic coating.
Of course, not only would Rain-X possibly make mask fogging *worse*, but it's also very bad stuff to get in your eyes. I've read of people trying it (not understanding the physics), and they generally report a very painful burning in their eyes. Not what I'd really like on a dive.
What can you do? Well, anyone who's been diving a while will have observed that new masks are fog magnets. The more you use the mask, the less it will fog. (I almost never apply any defog to my mask, and I have nearly zero fog issues.) There are things like mask scrubs, the classic toothpaste treatment, or even the "I'm sick of fog" lighter method (which seems to work but is a bit extreme for my tastes). Any of those may help. Just biting the bullet and defogging and knowing it gets better may be the best approach, and it's certainly the simplest.
So, wax cannot help, and Rain-X is a bad idea. Mask cleaners may help, but accumulated dive time certainly will. Commercial defoggers, especially the thicker gel/paste kinds, seem to last much longer than liquid defoggers, baby shampoo, or spit, especially when you're doing a lot of mask clearing. (Once your mask likes you, straight-up baby shampoo is plenty, and no tears, hehe.) Oh, and if you're using a gel-like defog, the key is to use very little, rub it in hard (e.g. pinch the lens between your thumb and fingers and press hard as you defog), and rinse as little as possible (only as much as you need to rinse to have a clear mask, which shouldn't be much since you only used a mini-chocolate-chip's sized dot of defog, right?).