I have a 2000 Holden Vectra. I had the automatic gear cable replaced and while driving, it changes gears perfectly fine and has plenty of power for a 2.2-litre four-cylinder. But when has been driven a certain distance it loses all gears but still idles. I then let it cool down overnight and it's fine to drive until it cuts out again.
I’d love to know what a “certain distance” is. That would give me a much better chance of offering a sensible answer. If we’re talking 100km before the car loses drive, I’d be thinking that it’s something electrical perhaps or something to do with the on-board computer.
But if the loss of drive happens within the first 10 kilometres or so of each drive, then I’d be suspecting the transmission itself. Have you checked the level of the transmission fluid? Too much or not enough fluid in the gearbox can cause it to run hot enough to lose drive. Perhaps it’s the transmission cooler not behaving properly and maintaining things at the correct temperature.
Automatic gearboxes hate high temperatures and if you continue to drive it like this, there’s a good chance you’ll cook something.