It’s accepted that there were “jar batteries” used for elecrtroplating, but there is doubt about the age of these (maybe 2000 years after the pyramids). Solar charging is even less likely.
Baghdad battery: https://www.smith.edu/hsc/museum/ancient_inventions/battery2.html