Thermodynamic Cycles
The thermodynamic cycles in major use today are Rankine (steam), Otto (gasoline engines), Diesel (obvious), and Brayton (gas turbines). There exist other cycles; I'm not as familiar with them and I won't cover them.
The major difference between the Rankine cycle and the others is that in Rankine, heat energy is produced outside of the working fluid, while in Otto, Diesel, and Brayton it is produced inside the working fluid. That is, in Otto and Diesel, liquid fuel is sprayed into a cylinder and combusted to move a piston, and in Brayton a liquid fuel is sprayed into a combustion chamber and combusted. Therefore, the Otto, Diesel and Brayton cycles all require a liquid fuel.
Rankine cycles are still used in power plants and other large scale applications, but fell out of use for mobile applications. Otto and Diesel cycles have the advantage of tiny working volume; all stages of the cycle take place in a piston that is only a liter or so at most. The Brayton cycle's advantage is that is not pressure sealed. A piston has to have thick walls to contain the explosion of inside it and direct that energy to the crankshaft. A Brayton cycle combustion chamber literally has a hole on both ends. No thick walls means much lighter. The Rankine cycle, on the other hand, has both thick walls and large fluid volume so there are limits to how small you can make it, and thermal efficiency drops sharply at small sizes.
Remove Liquid Fuels
To make the Rankine cycle a better option for mobile applications, the solution is to make liquid fuel less accessible or unaccessible. If there are no petroleum deposits, then fossil fuel is going to come from coal and coal alone. Coal can be turned into a liquid but that would not likely occur to people as a good idea unless there was a pre-existing use for liquid petroleum.
The OP already touched on this so I'm concentrate on an alternative.
Remove all Fossil Fuels
If you want to be more exotic, remove fossil fuels altogether. The geological conditions were never correct for fossil fuel development and no extensive oil or coal deposits ever formed. Remember, the Rankine cycle can use ANY external heat source. There are lots of whacky solutions like sunlight concentrated in a magnifying glass, magic crystals, electricity from a battery or rotary capacitor.
But I want to hard sell the technological development chain from radioisotopes to nuclear fission. Certainly this would be large scale departure from regular history, but let me make the case that it is practical.
Without fossil fuels what else would you use?
The discovery chain that lead to radiation went from studies of fluorescence of chlorophyll in 1819, to fluorescence of uranium glass in 1852, to phosphorescence of certain metals, finally to radiation in 1896 and radioactive decay in 1910. This was all pure physics, no requirement for an industrial revolution to have happened. In that case, the potential for heat energy from radioisotopes, a heat energy that was no available any other way, may have outweighed the danger of losing a Curie or two along the way.
Specifically, there are two long lasting radioactive materials, Thorium-232 and Uranium-238. Both are relatively common and easily mined and each have a distinct decay chain. The key to utilizing them is to take a block of uranium or thorium, and separate out the elements that are in the middle of the decay chain, but still have a half-life of several years. This material can then be concentrated and stored as a power unit. A radioisotope sealed in a lead sleeve will simply generate heat energy at a predetermined rate over time; a hot rock, basically. Perfect for use in a steam engine.
Conceptually, each radioisotope will have a thermal generation rate per mass, and a half-life. It will keep generating heat at an exponentially decreasing rate dropping its output by half every half-life. There is a sweet spot for isotopes: U-238 has a half-life of 4 billion years but a heat output of 8 $\mu$W per kilogram. The next step down the decay chain is Th-234 with a half-life of 24 days and an output of 6 MW per kilogram. One generates marginally more heat than iron, the other will probably melt itself (and radiation poison you) before you are done manufacturing it. Neither are very useful. The sweet spot is half-lives of 1 to 10000 years.
From the Uranium decay chain, useful isotopes could be:
- Th-230 (called Ionium by early researchers), halflife 75000 years, power 0.6 $\frac{\text{W}}{\text{kg}}$
- Ra-226 (Radium) halflife 1600 years, power 168 $\frac{\text{W}}{\text{kg}}$.
From the Thorium chain:
- Ra-228 (Mesothorium), halflife 6 years, power 3.5 $\frac{\text{kW}}{\text{kg}}$
- Th-228 (Radiothorium), halflife 2 years, power 177 $\frac{\text{kW}}{\text{kg}}$
A good range of isotopes for different applications; a locomotive might use the more energy dense mesothorium that has to be relaced every few years, an electric generating station with lots of space the long lasting less dangerous Radium. The significant downside is that you cannot turn any of these off. Cars would be completely impractical since your car would melt in your driveway. But trains and ships that are moving most of the time, and power plants and factories that are working all the time would be just fine.
To finish up, let me give you a little context on the dangers of radiation from these materials. Most of the energy from these reactions (with the exception of Mesothorium) is caused by Alpha particles, which are not very dangerous. They don't penetrate into your body, so while they can cause skin cancer, its hard for them to cause radiation sickness. All told, the direct radiation effects of these materials are then surprisingly low. Using the rad-pro calculator, I got unshielded rem/hr for sitting on a 1 kg block of each material as Ionium: .7 mrem/hr; Radium: 0.2 rem/hr, Mesothorium: ~200 rem/hour Radiothorium: 149 rem/hour.
So Ionium is safe for your kids, Radium is safe by 19th century factory standards, and Mesothorium and Radiothorium, the most energy dense, will make you vomit within an hour and kill you if you spend 5 hours standing right next to it. On the other hand, shielded containers, lead gloves and aprons on workers, and limited exposure could cut that dose a lot and keep people reasonably well. If you can get down to 100 rem/year, there probably won't be too much radiation sickness. Keep in mind, in a coal-powered steampunk world, the smog would be doing just as much damage to the common citizen.
So there you have it. You can eliminate fossil fuels altogether, run your society on radio-isotopes or have them develop into nuclear fission.