4000 watts is plenty, most of us don't get that through the shore power.
You don't say what you need a generator for, but I assume it is A/C, hot water, and cooking. Almost anything else can be run from the batteries. For example, I have replaced all my lights with LED bulbs to cut the battery drain at anchor....
1975 32' Flybridge Sedan, twin Perkins 6-354 diesels, 1:1.53 velvetdrives, 16 X 19 props. Merritt Island, Florida