If I have a piece of critical equipment I have started using the Energizer Ultimate Lithium's as I have never seen one leak. Also I use carbon zinc cells (the cheap ones from Dollar Tree) and have not had an issue with them. I have an Eveready D cell with a date code of 1948 on it that has never leaked. It is a standard LeClanche cell.
So I do not for the life of me know why they can't make cells that do not leak.
There is some physics and chemistry behind this.
Carbon zinc cells could leak when the electrolyte eats through the outer zinc electrode shell. However, they do not build up any gas pressure, and the electrolyte is a dry paste, so any leaking is just by creepage. Modern cells are packaged inside a steel outer casing which seals them and keeps the electrolyte inside. This is why modern carbon zinc cells are rarely seen leaking. No gas pressure and sealed outer casing.
Alkaline cells are built as a sealed unit, but they can build up gas pressure (hydrogen) inside while sitting around. There are chemicals to absorb the hydrogen, but if the hydrogen is produced too fast, or if the absorbing chemicals run out, then pressure will build up inside until the electrolyte bursts out. Due to the internal pressure, when the leak happens it tends to create quite a mess.
Lithium cells do not have much inside them that can leak, and have no gas pressure problem, so they are relatively safe.
NiMH cells certainly do build up gas pressure inside, but they are sealed very securely, so it will take an extreme event to make them leak. An extreme event could be severe overcharging or overheating. They are not likely to leak in normal use. (They are also quite dry inside, so there is not much to leak out anyway.)