After a few mystery e-stops I tried putting a filter onto the mains side of the VFD but no improvement. I then ran an extension lead from the other end of the workshop and plugged the VFD into that, instead of the row of sockets for all the CNC stuff (PC, monitor, control box power mains supply). Not a single problem since and has been good for months. Note that the VFD and motor cables themselves are still in the control box, next to all the other electronics. It's just the power lead that is connected remotely and that has solved it.