I implemented an instant pause function that can be hooked up to a button on a spare pin. It’s not in Marlin so you would have to patch yourself.
The trouble with anything at the gcode level (or pi) is that the movement queue could be 15 or 30 seconds worth of movements if you have lots of straight line segments. It’s not nearly quick enough for some cases where you need to adjust something, and any emergency stop loses the progress and can’t be resumed. That was the motivation for the instant pause.
It does carry some risk because it doesn’t decelerate or accelerate smoothly, so it’s possible that it could lose steps when used.