I've been doing switches for my layout, and shot some pictures of the motors so I can share the way I clean the switch machines. The motor shown is an early prewar motor. Later motors have different slide assemblies and contacts, but function the same.
The 711 and 022 switches use the same motor, the only difference is the base and the rail diameter.
Here's instructions for 022 switches in a PDF.After taking the switch machine off the switch, take the top off the motor. There are two different types of screws - the machine screws have the same threads all the way down the screw and go into the switch itself. The other screws have tapered threads and go into the plastic cases. The tapered threads are easy to spot because they usually have lines perpendicular to the threads. You might have lock washers on your screws.
Make sure when you put the switch back together you pay attention to the screws. You can force the wrong screw in, but will crack the mounts on the motor case.
Once you have the motor off, check to make sure the machine has no rust, corrosion, or damage. Check the cast ring the lantern goes on to make sure it is not broken. If the lantern ring is broken, or there is rust or any damage to the switch machine I don't fix it. Lionel postwar 022 switches are so cheap today that it is not worth the hassle of trying to get reliable performance out of a damaged switch.
Here's a nice looking switch machine:
If the switch motor is OK like the one above, clean the four contact areas circled in red on the picture below. These are momentary contact areas. When the switch is energized the slide moves breaking contact. I use an abrasive pen, you can use tuner cleaner or rubbing alcohol on a q-tip or a bit of a rag , or an ink pen eraser.
The areas marked with red Xs are where connections are made with pins that do not move. The two center ones are for the positive current and don't need to be cleaned if you are using the fixed voltage pin. The four corners are for the current from the non-derailing rails. A simple wipe for these is enough. If the non derailing feature doesn't work when you test it, you can spend more time examining these connections.
The next thing you do is check the spring that holds the lock down. It rarely breaks, but sometimes it's off or gone. It's shown in the photo below in the proper position.
Then check the wire from the bulb base to the fixed voltage pin. (Later motors have the wire routed differently usually they are OK, sometimes the early motors like this one have damaged insulation on this wire.
That wire is OK. If your wire is damaged, you can repair it with electrical tape or replace it.
The next step is to clean the movement and check operation. NEVER USE OIL ON THE SWITCH MOVEMENT. It will attract dust and cause problems. I brush the switch down with a dry brush and the use a dry toothbrush on the areas circled in yellow to insure there is no dirt blocking the movement.
Work the switch back and forth by hand with a lantern inserted into the lantern ring. If there is any resistance it will be in one of the areas circled in yellow above.
Once the movement is fluid, put a drop of dielectric grease on the four slide contacts. I put a small drop on two of the contact plates and then use a finger to move to it to the other plates. This is an optional step, but I've found the grease helps the switch contacts work for longer. The LGB brand shown works good and has a smaller hole than the Permatex brand availible at any auto parts store.
You can also see the abrasive pen I use.
Then connect power leads to a fixed voltage pin and the base and test the switch with by touching the center post to an outer post. If you have small screwdrivers with a palm brace like the one shown below, you can just roll the brace back and forth and the switch should throw each time.
Next we'll look at the base of the switch.