Accretion diagnostics for JWST–MIRI: establishing the relationship between mid-infrared hydrogen lines and the accretion luminosity