Oddly enough, when I sold my ST4s it developed a very similar fault. It was cutting out over 7,000 rpm and the revcounter dropped too zero. This gave the initial impression that the crank sensor was failing. It turned out to be the ECU earth wire wasn't fully tightened and resonance at 7,000 was making it loose contact. Start by check that ground, it's a wire with a eye terminal attached to the upper ECU mounting bolt. If not that then something is interrupting the supply to the ECU. Could be a bad connection at the fuse or possibly the ignition relay on the way out.