A space elevator is dominated by angular momentum and centrifugal force, not by Earth’s gravity. There’s no way for the cable to be pulled down to earth unless you strap rockets on it to slow it down, but even then that’s gonna cost a lot of fuel.
That scene in foundation was not accurate, if the cable snaps at some point it’s not going to magically decelerate from earth’s rotation speed to slow enough to be pulled down. The outer part will probably fly away and the inner part sort of hover in place.