It’s hard to imagine failure succeeding so well, but there it was. In the late 19th century, the modern American corporation arose in the form of the railroads, and a template was struck by the new financiers and entrepreneurs: Use other people’s money, pocket cash as you go along, and be far out of reach by the time the collapse comes.

That’s a bit of a cynical take, admittedly. But it’s also hard to refute, especially after reading “Railroaded,” Richard White’s detailed dissection of the rise and eventual fall of the nation’s railroads.

We’ve seen much of this history before, which is fortunate, since this can be a difficult book to follow (White has arranged it by themes rather than straight chronology, resulting in a whipsaw effect with people and dates moving in and out over the length of the work). The heart of the story is the rise of the railroads and their massive appetites for cash, land and raw materials that fed corruption, which, in turn, made it possible for the rails to be built in the first place.

What White, a Stanford University professor and author of several previous books on the West, brings here is a fresh and welcome agglomeration of wide-ranging historical detail, including eviscerations of some of the key figures — from Jay Gould to Leland Stanford — and an acute analysis that in failure came success and in many ways the map of the nation.

And it’s worth noting that for many of the railroads, the wealth was created by their very construction, not by their operation, in which they lost money, in a fashion comparable to the dot-com bubble more than a century later.

‘Railroaded: The Transcontinentals and the Making of Modern America’ by Richard White. (Norton)

“Railroaded” contains a fair amount of debunking. The transcontinentals of the title never really were transcontinental at all, White points out. But the railroads did carve deeply into the continent from existing Eastern networks, helping establish economic centers that simply couldn’t exist before.

White uses as an example the Canadian Pacific line to our north, which mapped itself across the Great Plains with stations about every eight miles. “Why eight?” White asks. “Apparently eight miles was the maximum distance at which a farmer could make a round-trip with a wagonload of grain on level terrain in a single day.” So a farmer midway between two stations was at the farthest reach of his day’s round-trip travel. And every 100 miles or so “the train would reach a divisional point with railroad shops and yards, which inevitably meant jobs and larger towns.”

Thus the rails began to forge the settled map of the continent, from the Canadian plains south deep into Mexico, on an east-west axis, cutting across the existing north-south axis that followed the two coasts and the Mississippi River. But much of the resulting use of space was manipulated by rate formulas aimed at reducing the power held by sea shippers. White devotes “Chapter Four: Spatial Politics” to that complicated issue and analysis.

The book also indicts a key element of what now passes for our national religion: that competition is good for the economy and good for society. As he points out, the railroads’ freedom to grow under that competitive system led to irresponsibly redundant lines that set the stage for broad failures and, in 1893, a devastating economic depression. Such a failure might be good in the abstract, an application of Darwinism to the business world, but in the concrete it meant tens of thousands of ruined lives, from workers to defrauded investors.

White busts another myth: that the rise of corporate America was propelled by sage capitalists who saw opportunity and, with hard work and ingenuity, built fortunes. In truth, the railroads were built on borrowed — or stolen — money and federal handouts, including the very land (stolen from native tribes) on which the rails were laid. “If all these federal land grants had been concentrated in a single state, call it Railroadiana,” White writes, “it would now rank third, behind Alaska and Texas, in size.”

In the end, though, the railroads helped make the nation and were key elements in the transition from an agrarian to an industrial society, in the settling of the continent, and in the rise of wage labor. “In part,” White says, “this book has been a study of how the unsuccessful and the incompetent not only survived but prospered and became powerful.”

And, perhaps, set another template for modern corporate America.

Scott Martelle is the author of “The Fear Within: Spies, Commies, and American Democracy on Trial.”