Dunno about the 4000, but the Microlite 2800 is a similar design. Mine has gone out twice with similar symptoms. Runs fine for 15 minutes, quit. Run fine for an hour, quit. Once it was the fuel pump, the second time it was the voltage regulator. Both times were in hot weather.
I found trouble shooting guides in the Onan service manual, and online at the Flight Systems website. You'll need a VOM (aka multimeter), not much else.
The 2800's voltage regulator is easy to find, but a beast to replace. 1 multiplug, 1 Torx screw. But the screw & hole are invisible under the engine, and there's no locating tab or lead-in to the hole. It's a serious pain but possible to do thru the access door on the 2800, not sure on the 4000. IIRC, the 2800's VR cost about $225 or so from Flight Systems.
Jim, "Mo' coffee!"