Technology archaeologists and industrial historians date the American Canal Age from 1790 to 1855[1] based on momentum and new construction activity, since many of the older canals, although limited by locks that restricted boat sizes below the most economic capacities[b], nonetheless continued in service well into the twentieth century.[c]
By 1855, canals were no longer the civil engineering work of first resort, for it was nearly always better—cheaper to build a railroad above ground than it was to dig a watertight ditch 6–8 feet (2–3 m) deep and provide it with water and make annual repairs for ice and freshet damages—even though the cost per ton mile on a canal was often cheaper in an operational sense, canals couldn’t be built along hills and dales, nor backed into odd corners, as could a railroad siding.
So that was maybe sixty, seventy years before rail was really displacing it.
EDIT: I guess what I’m trying to get at is that I don’t think that rail had a uniquely short era where it was the prime, go-to option compared to other transportation technologies…and I don’t think I’d say that the golden era was short enough to make the technology not a worthwhile investment, even if it was later, in significant part, superseded. A hundred years is a long time to wait around without engine-driven transportation, which would have been the alternative.
I mean, in that kind of timeframe, there were pretty major shifts in transportation.
For a long, long time, ships up rivers and along coasts was the way serious transportation happened.
Then we had the canal-building era in the US. I assume that the UK did the same.
searches
https://en.wikipedia.org/wiki/Canal_age
So that was maybe sixty, seventy years before rail was really displacing it.
EDIT: I guess what I’m trying to get at is that I don’t think that rail had a uniquely short era where it was the prime, go-to option compared to other transportation technologies…and I don’t think I’d say that the golden era was short enough to make the technology not a worthwhile investment, even if it was later, in significant part, superseded. A hundred years is a long time to wait around without engine-driven transportation, which would have been the alternative.