08 Mazda CX7 Engine mystery

A few weeks ago, after getting an oil change on my 08 CX7, I noticed periodically car revving as I accelerated. I immediately brought it back to the mechanic who kept it for 3 days with no findings. A week later, my husband was driving home from work on the highway when the car completely died (engine light, oil light, etc. on). We got it towed to our mechanic who has had it ever since. They said it’s not the transmission and may be electrical or miscommunication between the transmission and engine computers. They proceeded to check all the wires for loose wires/disconnections but did not find anything. As of Friday, they think it may be on the engine side but still do not know what it is. Any ideas?? I’m hesitant to take it to a Mazda dealer because of the horror stories I’ve read about CX7 owner experiences. The car has over 120,000 miles and luckily (or not), this is the first major issue we’ve had. We really need our car back or at least need to know whether the new car search needs to start!