It's not the ring gear or flywheel teeth that are usually the problem. When the starter solenoid plunger pulls in (when the key is turned to start), two things happen. At the end of the plunger there's a large metal disk that will bridge across the two main starter contacts. This connects the battery cable to the starter motor winding, causing the motor to turn. In addition, a lever attached to the plunger swings, pushing a gear that is splined on the starter motor shaft, into engagement with the flywheel teeth. This engages the starter motor with the engine, turning the engine at about 400 rpm (depends on design, battery etc, but this is a common rate). When the engine starts, the rpm of the engine rises to well over 400. When this happens the gear on the starter motor shaft is supposed to push back against the lever that had moved the gear forward. At this point, the starter solenoid has enough magnetic power to hold the plunger in, but not enough to hold it against the force of the starter gear trying to move back. The plunger therefore moves back a bit, breaking the electrical contact that had been made earlier. This cuts the power to the starter motor winding, and the motor stop running. Normally, the sliding gear and lever will then move back all the way to the resting position -- there's usually a small spring to help it. This makes sure that the starter gear is a good distance away from the flywheel.
When grease on the splined starter shaft and other internal moving parts of the starter get old, and cold, it gets stiff, and the starter gear and plunger might not move all the way back. The gear could remain engaged with the flywheel, causing the starter motor to turn very fast, and this can lead to a very distinct squealing, or screeching sound. Or, the gear will move back just enough so that it no longer is engaged with the teeth of the flywheel, but is still in contact on the outer face of the gear. This can lead to a "gear mashing" type noise.
The problem isn't grease on the flywheel or starter teeth, it's on the splined shaft etc. The starter has to be removed to clean the old grease, and relubricate where needed.