I used to live on property that was off the grid (up behind the Wild Animal/Safari Park for those familiar with San Diego), and we had a solar powered pump that ran to a cistern/water tower ("tower is being generous, more like "elevated on legs above the house level"). At any rate, a solar array powered the well pump, and when the float valve shut of that pump, the remaining power went into a battery house (literally a shed with shelves of car batteries), which was used for the house power. A back up generator was located adjacent the battery house, for those days here where we'd get continuous cloud cover and need power for the house, or there was a low power alarm and we wanted to charge the batteries.
BTW, a second well is a huge plus in the event your primary collapses, and you have to sink a new one (ask how I know).
Fortunately, the neighbor across the road had a water spigot near their road entrance, so they let us run 500' of garden hose across the road and into our cistern to top off every day or so, until the new well could be drilled.