Yeah, I'm largely spitballing. Perhaps the numbers don't work out, perhaps they do.
That said, solar over parking is a source of income. It may well pay for itself whilst providing parking that is both shaded and rain sheltering and improving energy security and helping fight climate change and probably powering a bunch of charge points underneath it, which you could either charge for or just leave free to encourage people to come to whatever the parking is attached to (or just the parking itself if it's a paid car park). My local Sainsbury's has a free charging point and it's a big part of why I shop there.
Also design the canopies to be their own scaffolding so the elevated maintenance is moot.
You can resurface under a canopy. Hell, petrol stations are almost always under a canopy and they definitely get resurfaced sometimes.
There's a risk of someone crashing into any building, too, but we still build things that are useful beside roads.
I'm just saying that, yes, it's not cut and dry, but I'm pretty sure the problems with the idea are generally solvable.