My opinion is - if you have a great surge protector - then plug your machine into the surge protector - also some generators (older ones) are not stable enough or cannot handle the load - check your machine - it should be on the label how much draw it takes to use your machine.
I lived many years off the grid - we had solar and generators - but we also had an inverter - the inverter really stabliized the power and draws from a bank of batteries then converts the DC power to AC.
I think it can be done - but if its computerized I would be cautious and use a surge protector.