FWIW, it may be useful to keep in mind that quantum theory
offers us a beautifully compelling and unequivocal way of
understanding the physical basis for the difference between "heat"
and "work", namely:
Any energy change in a system that is associated exclusively with
an alteration in the occupation numbers (rather than the energy
levels) of the allowed quantum states *will* alter the entropy
of the system and ought, therefore, to be considered "heat."
Any energy change in a system that is associated exclusively with
an alteration in the energy levels (rather than the occupation
numbers) of the allowed quantum states will *not* alter the entropy
of the system and ought, therefore, to be considered "work."