I think the biggest problem for Toyota, aside from a heart-wrenching 911 call recording playing over and over and the photographed aftermath of an incinerated and pulverized family with no instant explanation, was Toyota had been 'quietly' dealing with a couple of driveability issues related to the throttle.
One problem was the formation of tin whiskers in one pedal sensor which caused the throttle response to be non-linear - from the idle position to part throttle the ECU didn't see a resistance change and when the whisker lost contact it looked to the ECU like a sudden throttle input; not WOT, just dead-band and then a bit of voom, which startled drivers. Depending on how the whisker was positioned the symptoms would be irregular and testing with a typical ohm-meter could be enough to damage the whisker such that the pedal tests OK only for the symptoms to return.
There was also a pedal design issue. In an 'old-fashioned' car there is some sticktion due to the throttle linkage and cable so that a driver's foot could vary pressure slightly without moving the pedal. In drive-by-wire, there is just a pedal return spring and slight variations in pressure result in variations in throttle which results in slight surge/sag of power. So they added a friction source to produce sticktion and, in some cases, this meant that the return spring didn't have enough force to ensure the pedal returned all the way to idle when released.
When the accident happened it resulted in every leaf being turned over to explain why the family was incinerated so it came to light that some of this had not been divulged.
The 'trapped' pedal concept was advanced by Toyota both because that's what really caused the crash, the wrong floor mat was identified early on as a most-probable cause and, I think, to provide a simple to implement fix. It was also a dodge as there would have been hundreds of videos of pedals trapped by floor mats on YouTube. As far as I can tell, there was only one video, where a guy wadded a floor mat and shoved it between the foot well wall and the pedal.
The other source of trouble for Toyota was the lack of an obvious fault in the ECU that would explain the non-existent ECU related problems, leading to investigations into the software development practices at Toyota. These investigations lacked any demonstrations of realistic failure modes. I suspect it's true the ECU software wasn't made with significant fault tolerance in mind, but no one demonstrated any actual faults to be tolerant of. This led to the grand-standing of an expert and further unsubstantiated guesses increasing the speculation that there was something to hide. And let's not forget the driver who falsely claimed an out-of-control condition that seemed to be an extortion attempt that also implicated every Toyota, even those with entirely different ECUs.
In contrast is the VW ECU/Diesel lie, where independent software and hardware investigators were able to identify the place in the software and verify by bench test and testing in the vehicle that they had been programmed to cheat the federal emissions testing. Anyone could duplicate the observations/reproduce the results - they could look at the inputs and the state of the outputs.
In spite of the obvious value in confirming such a flaw in the Toyota ECUs I don't recall seeing anyone demonstrate a clear runaway causing condition.
Out of it all, one feature that eventually did make it into the software was a check to give priority to the brake input such that some amount of brake application would cause the ECU to ignore the throttle input and set the engine back to idle. This is a handy change to make, but I doubt that it makes much difference except in the case that the pedal is physically restrained, which doesn't seem to happen often, and maybe only ever happened on the one car. (Though articles claim there was a prior problem with all-weather mats, it seems so unlikely to be true; all the cell phones and no one put up a video showing their runaway death-traps)
The majority cause of unexpected acceleration is the same as always - pressing on the accelerator when intending to press the brake and then being startled by the sudden motion and pressing harder on the 'brake,' which just makes the control loop worse. Some (most?) of this has been dealt with by interlocking the shift out of Park with application of the brake, so that the car can't move from Park without the driver pressing the brake.
One thing that seems ignored is that the pedal problem is a side effect of cost reduction. Originally most accelerator pedals were hinged at the floor, which was advantageous to the placement of the pull-cable housing mount in the firewall. With the hinge at the bottom the worst a floor mat could do is run up the pedal and provide slight pressure with little moment arm. It required some time to install the pedal in that location.
The 'electronic' pedal meant that it could be integrated into the dash assembly and fit before installing the dash into the car as one unit. This exposes the end of the pedal to bypass the edge of the floor mat. If the user is able to push the pedal into the carpeting, an oversized mat edge can ride up and prevent its return, applying its load at the point of maximum leverage. An all-weather mat makes this worse by being significantly stiffer than the carpet mat and might as well be a wedge.
I expect one reason few people noticed this, aside from not having the wrong mats, is that it requires a very high level of pedal force. In the accident vehicle there was a report that the car seemed to have trouble keeping speed and then suddenly shot forward in traffic. If the mat was blocking the pedal travel, preventing ordinary application, and the driver got frustrated and stamped as hard as he could to overcome the obstruction, it would fit the observation. Why the driver just didn't put the transmission in neutral is a question - maybe he did and the sound frightened him, believing the engine would explode. (Hint everyone - Let the engine manage itself, especially if it's a loaner.)