Energy deposition by weakly interacting massive particles: a comprehensive study