This stirred up some dormant memories. The atrophied brain cells are starting to show some life and it's starting to come back to me slowly. (A long time ago in a galaxy far far away I was a Thermodynamics Professor)
The highest efficiency possible in a heat engine is represented by the idealized "Carnot Cycle." In practice a true Carnot Engine is not possible to construct, but the Stirling Engine comes close to the efficiency of the Carnot Cycle. To get maximum efficiency you have to have a regenerative heat exchanger, but since that is rather complex, most Stirling Engines have a displacer instead, which is usually an extra piston above the drive piston.
There are a few advantages of the Stirling Engine over steam engines, such as the fact that you don't have a boiler that can explode, and you heat the cylinder directly (which is the reason for the high efficiency). Even if a cylinder fails (which they did), it is not nearly as catastrophic as a boiler failure.
The reason the Stirling Engine fell out of favor for large scale applications and lost out to the steam engine was that since the cylinder had to be heated directly to a high temperature, the failure rate of the piston and cylinder was unacceptably high. Nowadays we have superior materials that can overcome that limitation.
For small scale applications, the Stirling Engine was successful until the advent of inexpensive electric motors, which eliminated the need for a heat source.
You could say that the Stirling Engine was ahead of its time, and now that vastly superior materials are available, maybe it's time has arrived...