Foam can and does distribute and absorb shock without being significantly damaged or destroyed in less severe collisions, crashes that can still put you in the hospital without a helmet.
I would maybe describe how helmets work as having a shock-absorbing cushion that slows deceleration of it’s contents. Talking about “energy” is bound to be misleading or confusing, since from a given speed, you always transfer the same amount of energy no matter how you stop, whether it’s a sudden strike against concrete or a slow gentle braking, or even waiting several minutes for air and tire friction to wear out all your kinetic energy.
I don’t want the helmet to be damaged or destroyed only because that means the crash is bad or severe.