The other option is to drop about $1000-$1500 on a
low frequency inverter that will take in 24v DC and send out 240v Split Phase. A couple panels and batteries in the pump house with it and a transfer switch or breaker interlock and you'll be good to go. Fortunately since well pumps run for such a short time normally you don't need a lot of battery, just a lot of amperage, about 300a or so so 4x 12v LFP's in series/parallel should be fine.
Build once, use forever.
Also called Split Phase power, if you were to look at the power through an o-silly-scope the waves would be 180deg off from each other. If they're not then the motor tries to spin at the wrong times and gets really, REALLY angry, Trying to run 2 regular 120v inverters doesn't work because there isn't something in between them telling 1 wave set to scoot over to keep the waves 180deg offset. An inverter that's built to provide 240v Split-Phase has that controller built into it and keeps the waves in the right place to make the motor happy.
If it's on a 30a breaker then it's probably a really large pump and/or really deep and you'd need somewhere a
round 3-6Kw worth of capacity not counting surge. If you can get an amp-clamp on one of those wires and find out what the actual amperage draw is that would help narrow down the size of the unit you need.
Just like any other solar project it all needs to start with the math:
How much does the pump draw? (Inverter size)
How long does it run in a day? (Solar panel capacity)
How many days of krappy weather do you want to have in your pocket? (battery capacity)
Once you have some basic numbers then you can fine tune a system to fit that need.
As an example:
My well pump at the camp draws 11.5a @ 240v or about 3Kw with losses and such, so I'd need a 3Kw/6Kw low frequency inverter.
It runs for about 45 minutes a day all total, divided by the 3 hours of sun I'd get in winter (always plan for the worst) is 3000w / .75 hours = 2250Wh, divide 2250Wh/3 hours of sun = 750 watts of panels and controller @ 24v nominal so a 40a controller would do me fine and let me over panel a bit.
If I wanted to have 3 days in my pocket of power, then I'd take that 2250Wh/day and multiply by 3 days for 6750Wh or 281Ah of battery. Might as well round that to 300Ah of battery since that's what batteries come in.
Since most BMS's (if I were able to use LFP's) come in at 100a current limits I'd probably want to stack my batteries to provide 400a of current, and using 12v batteries on a 24v system means 8 100Ah LFP batteries in the bank.
Just as an option anyways.