Have the solar panels feed into the grid during the day when they produce excess capacity, charge your car when you get home at night pulling power from the grid during what is then off-peak.
Ah so you must have a subsidised feed in tariff. Lucky you.
If everyone does what you do, will your approach still work?
Solar panels on cars is a fairly dumb ideal, although things are getting to the point where I would welcome virtually any car that is remotely unique amongst the sea of bland generic crossovers, fake SUVs that try to be everything and end up doing nothing well and yet they are extremely popular for reasons I will never really understand. It doesn't even really matter what you buy anymore, it's all the same car with a different logo on it.
https://medium.com/swlh/the-zombie-mobile-b03932ac971d
That is one reason why I drive an old car. It has more character.
I don't personally have solar, but I know people who do and they get paid for energy they generate during the day.
If everyone did that then no, it probably wouldn't work out well but we are not in a situation where anywhere close to everyone is doing it so that is not a problem. If things shift to where too many people are doing it then economic realities will push them in a different direction and it will work out.
I too drive an older car, it will turn 30 next year and it is getting to where I worry something will happen to it and I won't be able to find parts. If I had space to keep them I would buy up and hoard several more, or if I could buy a brand new 80s-90s car today I would. Cars have been bland and boring for the past 15 years or so and getting worse all the time. I really don't even know what I would buy later on if I had to because looking at what is available brand new today I cannot actually think of anything out there that I would want even if it was given to me for free. Car manufactures fret that young people are not as interested in cars as older generations but it's no surprise why, cars are so boring now, there is nothing unique, no character, no individuality, nothing inspiring, why would any kid growing up today be into cars?