What you suggested is more similar to what Solar Thermal systems do (https://en.wikipedia.org/wiki/Solar_thermal_energy). They are known to be more efficient than solar photovoltaics. They have their own downsides of course.
However, extracting exergy (electricity is pure exergy) from a flow of energy is the tricky part and will always be associated with efficiencies way below unity, based on fundamental principles.