Financial markets were relatively primitive before the development of representative governments. The Venetians led the way in the evolution of bond markets in the early Renaissance, and the Dutch followed a couple of centuries later, making more advances. Finally, after the Glorious Revolution, the English established financial institutions like the Bank of England that would become the foundation to the modern world of finance. All these developments followed the deveopment of representative governments.
The link is fairly straight forward. Kings and queens who need money would rather tax their subjects. They take $100 from you and it is now theirs, to do with as they please. But parliaments who are themselves subject to taxation would rather loan the government money in the form of bonds. Citizens pay $100 for a bond and get $5 payments for years - perhaps for as long as the government stands. Parliament would rather own an asset that could be bought and sold in bond markets than simply lose money through taxes.
Yet the demands of a government like England or France for money during the Napoleonic Wars was huge - requiring the rapid growth in the size and complexity of financial markets. Once financial markets were able to finance large governments and armies, they were well prepared to finance railroads and factories. It is no coincidence that the Napoleonic Wars ended in about 1815 and the first steam engine railroad began operation a decade later in 1825.
Representative government and its demand for money was the social invention that created the context for railroads and automated factories.