What you are talking about is called a combined cycle engine. They are commonplace in stationary power generation, i.e. utility-scale electricity generation. There has even been some talk of combined cycle engines in cars.
As pointed out in the answer by dmckee, the reason this hasn't been widely applied in cars is that no one has demonstrated an economically competitive combined-cycle car. I promise you, if such a thing can pay for itself in gas savings then it will eventually be built and sold, unless some better technology makes it irrelevant.
In general there are many reasonable ideas that are physically permissible but economically or technically difficult or nonviable. You are effectively suggesting to add a steam engine to a car, which is quite a difficult proposal. I'd suggest that a hybrid gas-electric car is more economical than what you suggest, and even they have had a hard time catching on. In electric power generation it matters much less that the combined cycle engine has a larger sunk cost than a normal engine, is heavier, etc., so the economic balance works out.
Bringing the question back to physics, no matter what you use for heat scavenging, your engine including all of its "subengines" cannot exceed the Carnot efficiency corresponding to the largest temperature difference in the engine. Adding additional heat engines will help to approach the Carnot limit. In order to beat Carnot, you can't use heat as an intermediate step between chemical energy (fuel) and mechanical work.
I never particularly liked the textbook description of this topic.
The key concept is that there's a quantity called "energy" that we've decided is useful and can't be created or destroyed$^1$, it can just change "types". This is useful because if you choose a system you want to study carefully, you can learn a lot about its behavior from energetic considerations.
Broadly speaking, there are two types of forces, conservative and non-conservative forces. A conservative force is one for which a potential can be defined, and with that potential comes an associated potential energy. For instance, for gravity I can define a potential:
$V(\vec{r}) = -\frac{GM}{||\vec{r}||}$
And there's an associated potential energy:
$U(\vec{r}) = -\frac{GMm}{r} + U_0$
So gravity is a conservative force. The abstraction is that by lifting an object in the gravitational field, I do work and store energy in the field. The field can later release the energy, and no energy is "lost".
Friction is really complicated. It can be, and is, modelled simply, but the process at a microscopic level involves rapidly created and destroyed chemical and/or physical bonds and is not fully understood. When work is done involving friction, we decide not to describe this as energy being stored in some sort of "friction field" (we would need to define a friction potential, and there's no obvious way to do this). Instead, we describe the process by saying that the energy is dissipated by friction, lost as vibration or heat (note that these are both a type of kinetic energy - heat is just a description of the average motions of a collection of particles). The important difference as compared to a conservative force is that heat, for instance, cannot be released from a surface to make a block slide faster. The energy dissipated into heat is "lost" from the system of a block sliding on a rough surface.
With all that in mind, tackling energy conservation problems just takes a bit of practice. My advice would be to forget about the formulae a little bit. Instead, look at the system you're considering and try and account for all the relevant forms of energy, and all possible exchanges/transformations between types of energy. The big "trick" is to define the extent of your system carefully. Students I've taught seem eager to add a thermal energy term to their analysis of problems involving friction, but this is often not a useful exercise. If it's sufficient to know that some energy was dissipated away as heat, you can just include a term in the math that expresses that the system lost, for example, $\mu_kN\Delta x$ of energy.
If I had to break it down into steps, I'd say:
1) Pick the initial state of your system, tally up any potential and kinetic energy.
2) Pick the final state of your system, tally up any potential and kinetic energy.
3) Go through the processes that occur between the initial and final state. Do any of them dissipate energy from the system? Or inject energy?
4) Add everything up (being careful about the sign of each term). Any difference between the initial and final energy of the system should be accounted for by energy injected into or dissipated out of the system in between.
$^1$ At least in simple physics... you can formulate theories/models where energy is created/destroyed, but this is only done if there is some advantage to doing so.
Best Answer
It is likely that most waterfalls will continue flowing, at least intermittently, for hundreds or thousands of years and are powered by the Sun which is expected to continue radiating energy to drive this system for much much longer.
Each waterfall can therefore supply a very large amount of energy. However only at a very limited rate - i.e. power output is limited by the flow rate of the river that feeds the fall.
The reasons this is not infinite include
A more conventional way to extract power from the flow of water is of course turbines built into dams on rivers.