To recap, the error code showed an rpm sensor and phonic wheel fault.
We replaced the rpm sensor. Made no odds.
The phonic wheel is a toothed metal wheel at the end of the crank, inside the sump, before the flywheel. 58 teeth and a gap to show TDC. Very occassionally these can crack and cause a misfire, but what can cause the error light to come on is if the car stalls when moving i.e. the engine conks out at a reasonable road speed. This had happened to our car....
So that got the codes out of the way, but the car was still not running right. Turns out it was the air flow sensor. As soon as we unplugged it, the engine would rev. So a new one has been fitted and a full 7,000 rpm has been re-established!
Turns out the air flow sensor will not show up as a code fault unless it is not passing any air at all.
Big thanks to all those who helped, especially AJ and Mr.T, and Paul at Clayton Garage who did all the dirty stuff.