You misunderstand, there's nothing wrong with the sensor, the crank has movement in it and thus the sensor goes out of alignment on pedalling, so the motor cuts out.
The bike has been to the local mechanic (who also sells these now, so is familiar with them) and it's diagnosis is poor. Pretty...