My previous experience of engine stop-start was with a Honda Civic Hybrid. At a stop (like lights) with foot on the brake the engine would close down after a little while and stay off until the accelerator was pressed. Easy, simple and worked every time. The car had a massive traction battery so always started effortlessly.
Recently with my new (to me) Subaru XV I noticed that its auto engine stop seemed to me to be often erratic. Would sometimes work at a stop and sometimes not. If it did turn the engine off, it would then start up again without me taking foot off the brake, sometimes after 3 secs , 7 secs or an indiscriminate time. So I thought there was a problem with the brake switching unit so off to the garage it went.
The garage kindly and gently referred me to the Owners Handbook where there is a whole chapter or so on this part of the cars anatomy. No longer a drive by wire type switch as on the Honda, but a complicated and deep thinking piece of software to ensure that the car engine would have the best possible chance to actually start again. It would check if the battery was up to the next start which can drain a battery, if the car was on an incline needing more engine power, temperatures, engine condition, and so on. In other words the Subaru has more smarts than I could ever have on this subject or ever dreamed of. What a car!
Well Done Subaru!