The brakes of a car in good working order should be able to overcome the engine and stop the car even if the engine is stuck at full power. But you have to do it decisively. Push the brake pedal to the floor and keep it there until you've stopped. What often happens is people are (very naturally) confused and not sure what to do, they'll brake but not hard enough, stop braking when it doesn't seem to work, try again, etc. This can heat up the brakes to the point where they're no longer effective enough to stop the car, and then you're really in for it.
I think stopping the power from going to the wheels needs to be an easy option. I wish there was more importance given to being able to easily do this.
I think the two options are shifting to neutral, or turning off the engine. I tested in a late-00s automatic BMW, and you had to hold the start/stop button for what felt like a very long time to turn the engine off if the car was in Drive. In an emergency, I think most people would give up long before it turned off. In that car, it was easy to change to neutral though, so I don't have a criticism about that design. What concerns me is cars with the same approach for the start/stop button, but where it is hard to get to neutral. I think in the Toyotas which had unintended acceleration issues, it wasn't easy/intuitive.
Edit: Another comment reminded me of something I forgot to mention above. You don't want turning off the engine to be the first resort because you lose power steering, and eventually, power assisted brakes.
That car was automatic, but he drove cars with manual transmissions a lot, so that would make it an obvious thing to do. I think in some of the famous unintended acceleration crashes, it has been unclear whether the person tried to change to neutral. A lot of newer cars have a much less intuitive method of doing so as well.
There's nothing as good in this regard as cars with manual transmissions though, in terms of having a dedicated pedal which disconnects the engine from the wheels, which you practice constantly during daily use.