The machine works fine on shore power. But when we’re away from the campgrounds, we fire up the generator to use it and sometimes it works and sometimes it doesn’t. It will start pulling a shot and just cut off. We found if we unplug the unit and replug it, that sometimes solves the problem and it will work.
Is it possible that the Nespresso is the problem? Perhaps something in its internal circuitry is cutting out when it sees the power from the generator? Maybe it's fussy about voltage or frequency?
I use a La Spaziale espresso machine at home with a Eureka Mignon grinder and go so far as to weigh input dosage and output yield in a certain time frame. It’s all scientific. So to use any machine or any other method is a step or three down.
Nice setup. We step all the way down to a mocha pot & pre-ground Illy when camping.

But my wife grew up in S. Italy after the war - unreliable power, running water only an hour a day, no central heat - so camping with mocha pot caffè is just like home for her. Still way better than Keurig, french press, percolator, etc.
As far as an inverter, because of the high current draw you'd have to have a fairly large inverter. I'd guess 2000w or so. To install that, you'd need (1) space and (2) heavy gauge wire from the batteries up to the inverter.
In my 22C the two batteries are connected to each other with 2ga. wire, but the wire from the batteries up to the electrical compartment under the drivers side ottoman is only 6ga & has only a 60A breaker. Can't run a large inverter off of that.
There really isn't enough space to just drop an inverter into that compartment. A combined inverter/converter could replace the WFCO converter, but space would still be very tight for any 2000W inverter/converter that I could find, even with moving the other components around. You have about 14"L x 5"H x 8" W under there, if you toss out the WFCO.
You could give up the cubby under the passenger ottoman and maybe stuff an inverter under there. That's where my lithium battery is.
You could put an inverter behind the couch & give up storage space. You might be able to stuff an inverter under the couch, passenger side, in between the couch frame and the interior side panels. You have roughly 16"d x 8"h 12" w back there. You'd have to run heavy gauge wire up from the batteries through the floor. To get from there to the electrical compartment, you can remove the panel under the front of the couch & run wires in that space.
I pulled the grey panel from behind the couch and use the otherwise wasted space under the sides of the couch for storage & will stuff another lithium battery in there someday.
--Mike