I am in the same thought process. What was worrying to me is the car went into limp mode. I did kick the clutch really fast when I realized I went into the wrong gear. I do not know the behavior of the ECU but maybe it went into protect mode, then I kicked the clutch and that is why it stalled. Once I came to a stop I was able to re-start it after 2 tries (possibly to re-learn idle??). After getting it home in limp mode I pulled the positive battery cable for 30 minutes plugged it back in and the car fired right up. No CELs, No smoke, No funny noises. Would pulling the battery cable clear a excessive engine speed code?
I haven't heard of the PCM stalling the engine to prevent damage, but I would not be surprised if it did. It does have a limp mode strategy referred to as FMEM (failure management effects mode). It essentially it limits throttle and fuel to prevent damage to the engine and emissions components. So that part is normal, until the PCM has determined that it is safe to go back to full capacity.
A battery disconnect should not clear a code, but anything is possible. There are two "modes" that the codes can be in, memory or on demand. On demand means that the fault is present right this second and this is a hard fault. If it is in memory, the PCM saw the fault at one point but it no longer sees the issue. When the DTC is in memory, it has to be cleared with a scan tool or go through so many drive cycles to clear on it's on.
My guess is that it didn't get a chance to set the code. Most codes require the issue to be present for at least 5 seconds at least 2 times before it trips a code. One time I was cleaning out my car and I accidentally put my floor mat on top of the gas pedal. The car shot to red line twice before I figured out what was causing it, it set a CEL but there were no codes present. So it knew that there was an issue but it didn't know what. I cleared the light with my AP and never saw it again.
If you are not experiencing any issues now then I wouldn't worry about it.
Also, if you were to check compression, disconnect the injectors rather than the coils. This prevents fuel from collecting in the combustion chamber when cranking. You can hold the gas pedal to the floor which will cause the PCM to go into clear flood mode which will shut the injectors off but it's an extra, unnecessary step.