Hello and welcome to the forum!
The first thing to do is to clean all the wheels, the pickup rollers and track with Naphtha to insure there is no dirt causing intermittent running problems.
If after all this is done, and you still have the issue, the motor may need replacement. Call Lionel service at 586-949-4100 to order a replacement.
Larry