Lattice vibrations boost demagnetization entropy in a shape-memory alloy