I suspect possibly vapour locking, particularly (but not necessarily only) if you were running on unleaded fuel. You had a hot-soaked aeroplane at a low ambient pressure. This can lead to localised vapourisation of fuel in the lines which can restrict fuel flow leading to loss of power or in extremis a complete engine failure.
I thought you handled it pretty well by the way, an engine failure and cracked spat doesn't even comprise a legally reportable accident.
G