Heat related problem.
A year or so ago my sister had a daily driver with a similar problem. When the engine reached temperature after 3 0r 4 km it would cout out after a splutter. All the service dept. efforts were in vain. They went through and pulled the tank, lines, filters etc.
In the end it was found to be an electronic component in the ignition module, in the distributor. A second hand distributor was sourced from the wreckers and problem solved. The last option was going to involve pulling the muffler to check for collapsed baffles but this was not needed in the end.
I recently replaced an ignition module in a Mazda only to have it fail 3 months later. Had to go for an ignition module with 2yr. warranty.The symptoms of the Mazda were similar to your problem. All earth connections were thoroughly cleaned and rebolted.