Why does mechanical stuff suck? Because of friction of moving parts. Too much energy is lost to heat. For a thermal engine, if you can arrange to put the moving parts mostly on the hot side, that’s no longer loss.
An RTG uses the Seebeck effect, which gets you microvolts per degree kelvin. A Stirling engine can theoretically extract many times more energy from the same temperature differential, but with a larger complexity.
Actually, when I mentioned thermoelectric conversion I wasn't referring to an RTG (which is just nuclear decay) but rather to the true nuclear reactors that the Soviets put in space:
Stirling engines can approach 50% efficiency [1], whereas thermocouples are usually less than 10% [2].
[1] https://en.wikipedia.org/wiki/Stirling_engine
[2] https://en.wikipedia.org/wiki/Thermoelectric_generator#Effic...