It's because there are other factors other than compression and expansion which cause engine braking. The engine is a mass of rotating and moving frictional surfaces being kept apart by a viscous fluid. That would provide the bulk of the engine braking, which is why you get more deceleration when engine braking at high rpm than at low rpm if you were in the same gear and at a low enough speed to avoid the effects of wind resistance. I doubt you will gain more energy back on the power stroke because when the air enters the cylinder it is heated up and is no longer at ambient engine bay temperature. So the heated air is compressed and can be similar to the cylinder wall temperature after compression. Even if you gain energy on the expansion that energy is still insufficient to overcome the resistance of the moving parts and the energy lost as heat each time the pistons change movement direction from up to down and back to up.
In high compression engines, the temperature heats up enough to lose some heat through the block.




Bookmarks