You may check distributor (if equiped) cap and rotor, change to new parts if their condition is not good. My old Camry stopped on road bfore traffic light a few times. After engine cooled down, I still could start and go. It took big efforts for shop to identify the problem. Eventually an experienced technician found it was the problem with distributor (I had changed cap, but it was not the major problem).