Most steam locos are between 5-10% thermally efficient. The main limitation is the theoretical efficiency of the steam doing work inside the cylinder. The input temperature is miserably low by Rankine cycle standards and you can't do better than about 18% even with no losses anywhere else.
Boiler efficiency can be up to about 80% with good coal and a good fireman, but can drop below 50% if there is a lot of small stuff being sucked straight through the tubes.
You also get wire-drawing and other fluid frictional losses from piston or slide valves (poppet valves can be better, but that's a can of worms).
The only way to significantly boost efficiency would be to use much higher temperatures and pressures, but those are really difficult to achieve within axle weight and gauge constraints. Both Fury and the Hush-Hush were effectively failures.
By the last few decades of steam, the main focus was on reducing maintenance and increasing availability through things like extensive mechanical lubrication, water treatment, SC smokeboxes, better bearings and horn guides, etc. No-one was really chasing thermal efficiency, except for the aberration that was the Crosti 9F.