Not being able to duplicate the problem on the ground is frustrating and makes troubleshooting difficult, but there are some things I would look at.
First, it could be a bad fuel pump. There have been two service bulletins regarding 912iS fuel pump mandatory replacement so make sure you have complied with those. If I had inspected the fuel pump circuit (see below) and found no problems, I would start with replacing the main pump.
If it’s a power problem, then understanding the circuit will help. The main fuel pump gets (+) power from Fuse #5 in the Rotax Fusebox. From the fuse terminal, power runs through the printed circuit board down through pin #11 of the X1 connector, then straight to the fuel pump via the fuel pump wiring harness. The X1 connector is the round 16 pin connector on the left side of the fusebox when facing the fusebox cover. The (-) lead from the fuel pump terminates on the ground plate of regulator A. It is the (-) side that is manually switched, so you will (should) have 12 volts (+) at the pump when the engine is running in reference to the EMS isolated ground plate regardless if the fuel pump switch is on or off. You will also have power at the pumps when the start power or emergency power switch is on, and those switches also tie the airframe ground to the EMS ground, so with either of those switches on you can test from the pump positive lead to the airframe and should have power.
I would check the the following locations for signs of discoloration and/or heat damage, or just a loose connection:
1. The connector at the fuel pump.
2. Pin 11 of the X1 connector. You have to disconnect the connector to look at this. Be careful when turning the locking collar on the X1 connector and don’t use any tools to do that. The plastic retaining pins on the lock collar are easily broken. As a side note, the locking collar can be easily replaced if broken, without changing the connector body itself.
3. Remove the Rotax fusebox cover and visually inspect the circuit board where the pins from the X1 connector terminate in soldered joints to the printed circuit board. Also inspect the socket for fuse #5.
4. All ground connections at the Regulator A grounding plate.
If you find a problem in the Rotax fusebox, the only repair is a new fusebox. If you find a problem in the X1 connector, that connector can be replaced on the wiring harness side, but the socket on the fusebox cannot. So if the socket of the fusebox is damaged, your only option is a new fusebox. If it were me, I would want this sorted out before flying the aircraft.