Got dynamic switching between float and double working (based on derivatives of pixel coordinates). But I don't know if it's actually computing both and switching afterwards - there isn't much noticeable speed increase at shallow zooms. GPUs are weird.
But there are some bugs in FragM that mean my desired workflow is not yet attainable: the code that parses the shader for annotations about uniforms to build a GUI with is a bit dumb and doesn't respect preprocessor #if, which I was hoping to use to fallback to float when double is unavailable.
Actually it turns out building a better parser for uniform/GUI mapping that respects #if is a #hard #problem because so many things are #define by the GPU driver #GLSL #shader #compiler and it's tricky to get at them from outside shader source, and it's trickier to get things from inside shader source to outside.
My current code works to an extent which is good enough for me, as long as I don't poke it.