In the boundary friciton regime (slow-motion stop and go movements) of guitar worm gears, a very high viscosity, highly adhesive lubricant is needed (as Klaus Scheller already pointed out). I use bicycle grease. Thin machine oil is too light, and will be squeezed away from the point of contact by the very slow stop-and-go movement of the gears. I am not familiar with heavy oils. They are mostly made for high-speed high-temperature applications, such as car journal bearings--conditions that you don't want in your guitar. High quality spur gears (the one that turns the worm), such as Klaus Scheller's, are frequently made of brass or specialized bronze to reduce friction and lubrication requirements.
All contact points between two metal parts that move relative to each other need lubrication. I don't know the correct name of the axle of the gear worm that is mounted in the piece that holds the gear; otherwise I would be more specific.
WD40 lubricates only for a very,very short period of time. It is very thin and evaporates. It is meant for cleaning and unfreezing joints, not for lubricating. In fact, it will dissolve and wash away lubrication. I don't want the stuff near my guitar. I am afraid of what it will do to the wood and the finish.
I would not use anything between the tuning barrel and the headstock that could get absorbed by the wood. As for paste wax, I am not familiar with its lubricating qualities. I think it sets up and hardens (not good for lubrication), but I am not sure about this. Perhaps there is a carpenter out there that can illucidate.
Marius van Handel
Yisrael van Handel
Modi'in Ilit, Israel