Lionel used to have the gears. They are nylon, shrink with time and crack. I drilled a hole in the gear all the way through and used a piece of music wire to keep it from spinning but it would catch on every revolution where the teeth had spread apart. No glue will hold nylon together. Best replace the gear. BTW its not as complicated as the TMCC wrecker crane. Not a big deal to reinstall the thread.
Pete