That’s the broken one that was replaced and the problem was sorted. I can take the one off the bike if it would help.
You've given enough info. There are two things to look for. Firstly, that black disc must be an even 1mm from the actual sensor that sits next to it with a wire coming out. If your chain comes off or it's not on tight enough, it can move away, then it won't work properly. All you have to do is wiggle it back into position. Secondly, if they're too loose on the shaft, instead of turning with the pedals, they start slipping. You can check that by watching it while you turn the pedals and/or put a finger on it lightly to see if that holds it still while the pedals turn, which it shouldn't do.
After that, you have to check that the wire isn't damaged, then follow the wire to the controller and check the connector there to see if there's any corrosion or other problem. All these things are pretty easy to check and only take a couple of minutes.
On 8th August, I'm going to East Grinstead (West side). I'll probably be going round the M25 from Essex, then down the A22. If you can get the bike anywhere near that route, I'd be happy to have a quick look at it if the above doesn't sort it.