Modern generators have electric fuel pumps, although they are special low pressure pumps so not to flood the engine. In addition, they have electronic circuits that monitor oil level and pressure, temperature, etc. One of the functions of that board is to turn the fuel pump power on while cranking, but it shuts the power off if no ignition is detected.
The problem with your generator is that it has no easy way to safely turn on and off the electric pump. In this linked manual,
there is mention of a gas shut off solenoid, that might provide power when appropriate, but I'd check very carefully that it will shut off the pump if the engine stops.
I think if you can find a mechanical fuel pump, you might just replace the old with a new one.