First, pull the ECU and its associated circuitry from a failing vehicle (pay the customer the full purchase price, of course). Place everything in an environmental chamber capable of temperature extremes from -50° to 100°C (about -50° to 210° Fahrenheit). Use a chamber that can also produce humidity extremes and vibration. This is a tried and true method for stress testing circuit boards and forcing them to display a fail that otherwise might escape detection, whether that means a cold solder joint or a faulty memory chip. Supply inputs from an external source to the throttle, brake and other I/O's on the ECU, driving them repeatedly high, low, and every possible combination in between. Measure and record the outputs to throttle servo and brakes. Keep track of those error signals.
This would also indirectly test the firmware, although not with the in-depth level as a line for line debugging.
If a vehicle has experienced sudden acceleration issues, and done so more than once, this would very likely repeat it. And, it would do so in a safe environment where the variables could be recorded in realtime instead of autopsied later.