Batteries are indeed very expensive and have terribly short life.
What I do these days is spec batteries based on the end need.
Some examples:
Offgrid out building - 15 watt solar panel on the roof - (4) SLA 12V 6A(?) batteries --- use = motion sensor (24/7 draw) and LED lights
Bicycle lighting - no power source - (1) 12V 6.xAH lithium technology pack - use for running lights at night and accessories
Other bicycle light / portable lighting - no power source (charges from main power) - (1) 12V pack made of 8 AA batteries in a project battery pack. Rechargeable alkaline.
The SLA batteries are blah. Not so good. Perhaps age and environment or perhaps not enough high A charge from time to time. Panel maxes the battery and goes into over volt discharge for protection on a good sunny day. More panels? Not such a good idea.
Lithium pack - pretty good value. It is a Chinese blue wrapped pack. Few years old by now. It's light infrequent use. So far, very good. Cost was roughly $7 per AH.
AA Alkaline packs - active project. Use these in all sorts of things and have them laying around for as-needed power. Have 20 empty packs waiting to be built
Downside is AH of the packs are 1-1.5AH. Packs are made of (8) AA cells - standard off the shelf AA's. Roughly $5+ tax for 20 cells. 25 cents US each or $2 total in cells. Downside is the discharge needs to be regulated (cut off voltage regulator with 20% approximately storage left in cells). Charger for these is not great and standard main power. Mind you, recharging standard alkaline cells which everyone has been trained are throwaway single discharge.
There are rechargeable alkalines, but one line I've bought that are manufactured in Canada are horrendous. Obviously, NiMH needs revisited in this design but the pack requires more cells and is iffy if not regulated as NiMH has top volatage that can be higher by several volts when charged, but retreats quickly, so have to run a pack of 10 NiMH cells (I need a AA big gang charger and 10AA holder packs).