Sounds like a GREAT "science fair" project! But, it probably not economically-practical, because there are already good alternatives where it's not economical to use (and throw-away) a mostly-discharged battery.
A solar battery charger is probably more practical. But again, the economics are usually not there... With the cost of the solar panel, the "free" energy is probably going to cost more than plugging into a wall (assuming you have wall-power available). For "trickle-charging", solar can work very-well, especially if you don't have convenient access to "traditional" energy. But, if you need to charge-up something like a laptop battery in a reasonable amount of time, that's going to take a fairly large solar panel. It would also take a shipload of "dead" flashlight batteries.
Now throwing them away would be a waste of energy,
to waste energy, but like it or not, EVERYBODY wastes energy. Almost nothing is 100% efficient, an it often comes-down to economics... Would you pay twice as much for a car that gets 1% better gas mileage? That would be stupid, unless you have so much money that cost doesn't matter. On the other hand, it would be stupid to not
to pay 1% more for an identical car that gets twice the mileage.