My car engine sometimes starts racing when it's idling or going slow. on 1997 Ford Taurus

Intermittently not constantly, car engine starts racing when I'm at a traffic light or drive-through. I have to stomp on the brake to stop it from hitting the car in front of me. It happens off and on, sometimes not at all for weeks, sometimes 2-3 times in the same short trip.

Asked by for the 1997 Ford Taurus
It sounds like the idle air control motor may be going bad
Thanks for the tip, but when I looked up info about this online, it sounds like it leads to the engine stalling out, not racing.