The heat death is older than 20th century cosmology. It showed up as thermodynamics became a science in the 19th century and quickly led to the conclusion that free energy was running out. Most Victorian scientists expected that if the universe were to last indefinitely this had to be the end, but the view was not universal. Lord Kelvin argued in 1862 that this was not a problem due to the infinite size of the universe:
"The result would inevitably be a state of universal rest and death,
if the universe were finite and left to obey existing laws. But it is
impossible to conceive a limit to the extent of matter in the
universe; and therefore science points rather to an endless progress,
through an endless space, of action involving the transformation of
potential energy into palpable motion and hence into heat, than to a
single finite mechanism, running down like a clock, and stopping for
ever." (William Thomson. Physical considerations regarding the
possible age of the sun’s heat. Macmillan’s Mag., 5:388–393, 1862.)
Steady-state cosmologies hung around as a possibility for a long while: Einstein's original cosmology was one, and Hoyle famously championed one that was both expanding and infinitely old. They lost out due to observations (expansion, CMB, primordial elements) relatively late, as J.G. points out.
Cyclic cosmologies have appropriately enough gone in and out of fashion for a long time but generally never been "the" mainstream view. A version is Boltzmann's idea that even a universe in equilibrium will randomly generate localised order from time to time, so there could be new worlds forming just by chance. This is close to the Poincare recurrence issue, where systems constrained to finite phase space volume will eventually have to cycle back to their original state; whether this applies to the universe or not seems to be a bit contentious right now (it depends on whether one thinks the horizon, as per the holographic principle, has a finite entropy capacity, or whether the openness of the expansion makes the phase space expand).