The solar panel with inverter does not have any inertia so it can survive power spikes more easily, can lower the voltage till it's over. The generator on the other hand has physical rotating parts that could be damaged by sudden torque asked by increased load. Of course it could be mitigated with additional "soft start" circuitry on the motor but that's usually not included. Not capacitor alone please, you risk more damage.