Hi, that looks like a lot of fun
Jon's the expert on electrical stuff and I'd concur that it's likely to be a bad earth or loose/poor ECU or engine sensor connection somewhere. Finding it might be another issue!
RX-8 230 Bridgeported: Racing Brake Disks & 4 pot front calipers,Full Racing Beat (RB) SS Exhaust system,RB ARB's F & R,RB REVI intake,Tein MonoFlex Coilovers & front strut brace.
RX-7, KIMI 1, 1st Gen S2, Silver,1983 - SORN
RX-7, KIMI 2,^^Ditto - now sold
RX-7, KIMI 3, 1st Gen S3, Red,1984