You mention the stumble and power shutdown in economy mode. Does that only happen with the AC running, or does it happen anytime powering the trailer regardless of the AC?
Does the generator idle smoothly, or does the idle lope or hunt (seem to surge or run both fast and slow)?
The fact that it keeps running but stops making power seems like an electrical fault. But the fact that it runs with the gas cap off seems like it's an airflow problem. So on the airflow premise I'd say there are a few possible causes that I would try in order of easiest to hardest.
You already changed the cap so that's probably not it. But make sure the vent on the cap is set fully to the run position.
If the idle surges or hunts you probably have a dirty carburetor. a shot of Seafoam engine treatment in the fuel tank might cure this. Otherwise you'll have to disassemble and clean out the carburetor which is a bit more difficult than what's below.
You might just have a dirty air filter. Try running it for a few minutes with the filter removed. Or just clean or replace the filter.
Clean off the spark arrestor.
Change the spark plug.
Clean out the carburetor and adjust the valves.