Would people even be able to remember ethics in their panicked state?
It might apply to the engineers calmly sitting at their desks designing algoritms for autonomous (self-driving) vehicles.
Yes, some will be able to react properly and thinkingly under the pressure and time constraints.
But is that a good way to be, since in general, the effects of that rush of adrenaline are worth the loss of some thinking abilities?
Isn’t this one of the main purposes of mussar – to take what we know through the Torah that we should b’etzem be doing and ingrain it into ourselves so that it doesn’t even take any thought?
One of the ways we are mechuyav to do something like this is by shema, by active thinking that yes, I would give up my life for the mitzvos.
That kind of learning takes practice, and practice driving trolleys over people is problematic.