Car revs up and down while idling

I agree. I’d look for a vacuum leak first. The transmission “flush” you had may cause problems down the road, but the transmission is not the cause of this particular problem.