As I understand it, heat is simply molecular agitation, and therefore
nanoscopic mechanical energy.
I think you are confusing heat with internal energy.
Heat is the transfer of energy due solely to temperature difference. The kinetic energy at the atomic and molecular level (microscopic kinetic energy), what you call "molecular agitation", is properly called part of the internal energy of an object or substance, not heat. Heat transfers that kinetic energy from a hot to a cold source due to the temperature difference.
You can think of the operation of a heat engine in a cycle as roughly being the result of extracting some of the heat from the hot source performing work and passing the remaining heat to the cold source. For a heat engine to perform net work in a cycle, a cold source is always required per the Kelvin-Planck statement of the second law which is:
No heat engine can operate in a cycle while transferring heat with a single heat reservoir.
Regarding your edits, the proper term for what you are now referring to as "thermal energy" is still "internal energy", not heat. You still can't equate internal energy with heat simply by referring to internal energy as "thermal energy".
That said, then of course you don't need a temperature difference to extract work from (reduce the amount of) internal energy. The first law for a closed system is
where $Q$ is positive if heat is added to the system and $W$ is positive if work is done by the system (e.g., expansion of a gas).
For an insulated (adiabatic) system, $Q=0$ and $\Delta U=-W$. So you are extracting work from internal energy (what you call "thermal energy") without a cold reservoir.
Hope this helps.