There are ways, piezoelectric devices can generate power off temperature differential. And mechanically you could put a stirling engine on although the torque and rotational force likely would not be ideal.
WRT Stirling generators, there is already work ongoing for arrangement ssuitable to space applications, through new research on nuclear power sources (stirling radioisotope generators, and the Kilopower nuclear reactor). Generally the solution is to mount several Stirling generators such that their torques cancel each other out. Search for "managing the stroke of the pistons" at https://beyondnerva.wordpress.com/2017/11/19/krusty-first-of...
> They are mounted to motorized arms that will retract almost all of their surface behind the Thermal Protection System – the heat shield – when the spacecraft is close to the Sun.
Yes, there's a moving part. It only has to move twice (deploy, mostly retract) but it's still a moving part.
A motor that predictably moves an object from one point to another can be much more reliable than an array of heat-driven reciprocating engines that have to be in constant motion and rely on conducting heat toward the internals of the spacecraft in order to function.