If you’re happy with the M1 performance, you could look into getting a used M1/2/3 mini a run some stuff via ssh? Much cheaper, and maybe even much better.