The official response for the retired Road Foreman Of Engines (that would be me) is as follows. I even looked this up. I found two references to this in engineer's manuals published by the D&RGW and Santa Fe.
The official response is to apply the brakes, open the cylinder cocks and center the reverse gear, hopefully all at the same time (!). Then reducing boiler pressure as quickly as possible. Having the valve gear centered, may not completely close off the ports, but limiting the cut-off to just the lead of the valve will greatly reduce the amount of steam entering the cylinders. Stephenson valve gear goes through lots of valve motion gyrations by increasing the lead as the gear is hooked up and blocking the valve in a centered position with the reverse gear would not be that effective. The point made in the books was get the engine stopped as quickly as possible without tearing something up.
We actually had something like this happen over in Antonito. I think it was with 489, where the throttle simply would not close all the way. Fortunately, it happened in the morning as the engine was being run from the ashpit out of the enginehouse that morning. After a while of opening and closing the throttle, it finally seated. So now what do you do? Run it and hope it doesn't do it again? Not a good plan. We hurriedly sent another engine across the railroad for relief and using the drifting throttle (saturated steam of small quantity from the turret) the engine could move itself at up to 10 mph. It was brought back to Chama that way. It was along day.
Investigation showed the throttle assembly had come loose at its connection with the top of the dry pipe, and cocked itself to the side Eventually sawing back and forth on the throttle got the valve to straighten up and seat itself correctly on the dry pipe. Once 489 was back in Chama and killed, the dome was opened up and we found the strap that clamps the valve to the dry pipe had come loose on one side allowing the valve to cock to one side and the connection to leak.