I’ve wondered about these occurrences. Certainly there is a history of pressing the wrong pedal in an automatic and going through the back of a garage etc.
However I wonder how fail-safe the accelerator pedal electronics are on these drive-by-wire cars these days.
I would hope there are at least two potentiometers and that the computer decides if one goes to 100% and the other one stays low then there’s a fault and it doesn’t go full pelt into the car in front.
The usual way drive by wire throttles are done (and naturally all EV's are drive by wire throttle!) is indeed to have two separate potentiometers on the same shaft, with two separate signals that are compared by the ECU to ensure coherence - if the estimated throttle positions indicated by the two signals is more than a small amount out a fault will be raised and the car will safely lose power.
But more than that, the ends of the potentiometer are wired opposite to each other, so that at closed throttle one is outputting near zero volts and the other near 5 volts, and at full throttle this is reversed. Only at half throttle would they output the same voltage.
This allows detection of a fault such as an open circuit in the signal or 5 volt supply wires - say the 5v supply went missing and both potentiometers then output 0v - this is an impossible situation outside of a fault because they should never both output 0 volts at any throttle position. Reversing the sense of the potentiometers in this way makes the coherence checking much safer and more robust, as there isn't really a fault scenario where the two reverse wired potentiometers could pass the coherence test.
While I don't think it's impossible to still have a "full throttle fault" in an EV or drive by wire system, it's actually much more likely to be a software bug/glitch than a faulty throttle pedal or cabling, if it happens at all.