Is the eventual heat death of the universe due to the expansion of the universe?
As far as I understand it, the heat death of the universe is a consequence of entropy, not expansion. All processes result in the shifting of some energy to higher entropy. Though the observable universe is an open system, the entire universe is an isolated system, so as more and more energy gets shifted to higher entropy over time the universe will eventually reach a state where effectively no work can be done.