What typically kills small engines, such as the generator you bought for that big power outtage, ran for 2 days, and havn't touched for 2 years, is internal moisture. There is moisture in the air. With temperature cycles, the case breathes thru the crankcase vent. The moisture in the air then condenses on the internal surfaces, like morning dew on the grass, and the bearings and journals and rings and cylinder quietly corrode out of sight. So after setting a few years, you have another big storm and power outtage, and crank up the old genny, which throws a rod about 45 minutes into the run... "cheap POS box store generator!" Lawnmowers that use the same basic engines, last a good long time because they typically get used half of the year:)
In addition to the oil and fuel system suggestions, Find the case vent and cap it. Better still is to attach a dessicant filled container that is capped. The dessicant will attract moisture in the case air and trap it in the dessicant. If you use indicating dessicant, it will tell you the relative humidity inside the case by it's color. It is dark indigo blue when dry, and slowly turns light pink as it absorbs moisture. I buy the inexpensive clear plastic in-line filters and pour in the dessicant around the outside of the filter element, and cap that port with a rubber vacume cap. The other port that connects to the inside of the filter, I connect to the vent. I use these on my hydraulic reservoirs and tractor gearbox vent to keep internal condensation in check in those systems that do not get hot enough to drive off the moisture in the oil. I put a small pinhole in the rubber vacume port cap to allow the tank to breath once enough pressure is built up to overcome the resistance presented by the pinhole... But any air that comes in or out passes thru the dessicant. For a layup situation, I would not put a hole in the cap. I will post a picture of one of these later.
I have heard of some layup procedures where the air in the case is purged with dry nitrogen to get rid of that moisture, prior to sealing the vent...
Here are some pics of the dessicant filters I make.
Closeup.
Saturated with moisture.
When saturated, I remove the rubber cap, shake out the pellets and nuke them on a paper towel. Cooks the moisture out and restores them to dark blue ready to use condition...