Detecting magnetars with Einstein Probe