Thanks, that makes sense. One other question: what is "excess power from the engine" and how is it possible (2nd law) that using it to recharge the batteries is better than using it to move the plane directly?
Many planes have a "constant speed propeller", which allows the engine to be kept at its most efficient load, while adjusting the pitch of the propeller. Optimal use of power needed for climbing but otherwise left unused in straight and level flight is a solved problem.
How can you say the this approach is more efficient than one which keeps the engine at a constant load and varies propeller speed, for example? (it involves complicated fluid mechanics to figure it out)
This is a reason mathematicians loathe the overuse of "optimal" by engineers: in the real world there are often too much variables.
You can't have constant load -- the power needed is dictated by the conditions. But what is known is that you want to operate at full throttle to be the most efficient, so the way to vary power is to vary RPM. (Propellers are also generally more efficient at low RPM, but I don't think that's what was referred to here.)
That's only true in a naturally-aspirated engine at high enough altitude that you can cruise at full throttle. If you have to close the throttle, you lose efficiency.