As a general point, talking to my neighbours and friends I note that very few have a clear plan ready in case of engine failure. With so many modern vehicles having power steering and power assisted brakes, engine failure can cause feelings of panic.
With some planning the shock can be minimised, firstly be sure you know which position of the ignition key sets the steering lock on. Practice turning the engine off without setting the steering lock; be sure you can do this without fail before you attempt the trial.
The trial – find an open space with plenty of room or an empty road, drive along, slowly (at first), turn off the engine (leave the key in the lock!), turn the hazards on, bring the car to rest at some preselected point, simulating, getting to the hard shoulder or getting off the road, you can de-clutch (neutral on an automatic) to prolong the run, as required. Now when it happens for real you know what it feels like and that everything still works.
In a real incident, never waste time/momentum trying to restart, get to a safe/safer position first. Should you stop short of safety, you can engage a low gear and use the starter to drag you to a safe position; it will only do this over a very short distance. Note, at motorway speeds the vehicle will slowdown quickly, de-clutching is usually the best choice if you have a lane or lanes to cross.
This assumes that you are aware of the traffic around/behind you, you still need your mirrors on the motorway.