Won't work. It is thermodynamics and physical chemistry.
Combustion is not an explosion it is a (fast) burn. I have a degree in chemical engineering and a burn is mass transfer limited. Oxygen and fuel must come in contact and the fuel is oxidized producing heat. Efforts are made to slow down the burn rate so it does not complete before the cylinder gets to the bottom. Lead was great for slowing burn rate. Super is slower burn. Ping is when the gas vapors burns too fast.
On an explosion the elements are already in contact and you are only limited by kinetics.
Basically an explosion is too fast for a thermal engine. Now you may invent an engine other than a thermal. A thermal engine means not harnessing the energy directly. Rely on PVT (pressure, volume, temperature) properties to push the cylinder.