We first must consider if it is more likely that Scottish intellectual achievement has fallen since the 19th century? Or that that global intellectual achievement has risen.
The innovators you have listed are all tied to the industrial revolution. So let us consider that in its geopolitical context.
https://commons.wikimedia.org/wiki/File:Europe_1815_map_en.png France is still reeling from the French Revolution, and the Napoleonic wars have ravaged most of Europe. Overrunning Spain, and the countries now present in modern day Italy. Most Russian cities were burnt down, largely by the Russians themselves in their war of attrition against Napoleon. Though Prussia did not suffer a similar fate, they had been committing the bulk of their resources into war preparation and fighting Napoleon. The Ottomans were not involved in the direct fighting, but their Empire was well on its decline as of the 1800s due to internal corruption. And the non-European powers of the world, were either colonies or decades away from the capacity for an industrial revolution.
The United Kingdom was the only major power to come out of the Napoleonic era relatively unscathed. Owing to the superior British Navy, French troops never set foot on English soil. Couple this with the British Empire, which now spanned a quarter of the world's landmass, and you have a recipe for economic prosperity like none-other.
There are 4 principal factors that lead to the UK's industrial revolution. Availability of Capital, Sociopolitical Stability, Enormous Overseas Trade, and a Small Population. Capital is necessary to invest in innovations, and stability is necessary for inventors to devote themselves to their work. Thanks to the success of the British in the Napoleonic Wars, the UK had both in spades. The next two factors go hand in hand. The population of the British Isles was unable to keep pace with its ever-growing trade. Thus, this necessitated the creation of new devices to keep production in line with the growing demand.
This is best exemplified by the changes in the textile industry as well as the coal industry. The shortage of labor force compelled industrialists to encourage and apply new mechanical devices. Watt's steam engine was intended to pump water out of mines.
Keep in mind. It is perfectly possible that other men in other parts of the world had the same ideas as the innovators of the UK. But lacked the same socio-economic conditions that allowed UK innovators to be successful in their endeavors.
If you've stayed with me this entire time, you must be wondering. Why Scotland? The UK of the 19th Century encompassed the Irish, the Welsh, and the English. So why were the Scots the only inventors? The simple answer is that they were not.
The list of English inventors who contributed to the industrial revolution is equally impressive, and significantly longer. Such as Jethro Tull who invented the Seed Drill, Thomas Newcomen who devised the first practical steam engine, Edward Jenner who invented the first Vaccine, Abraham Darby III who built the first Iron arch bridge, and Charles Babbage who created the Difference engine, an automatic mechanical calculator designed to tabulate polynomial functions. The difference engine is especially fascinating because it is the intellectual ancestor of all modern computers.
In all honesty? Nothing happened to Scotland. The University of St Andrews, the University of Glasgow, and the University of Edinburgh are still regarded as some of the best in the world. They don't have any shortage of Nobel Prize winners or major intellectuals.
The Scots never declined, the rest of the world caught up. During the Industrial Revolution in the UK, there were no competing innovators from India, China, or South Africa. The universities that lead Silicon Valley, Berkeley, and Stanford, had only just been founded.
There were many pioneers of Industrial philosophy and technology in Scotland because of the social-economical-political factors present in the UK. The grand intellectual traditions of Scotland have continued, but no longer look as impressive when compared with the rest of the world.
I addressed what I felt was the core of your question. If you want the nitty-gritty of the exact conditions in Scotland. Things like the Political Economy Club, where Adam Smith first debated and discussed with merchants and academics. Then I would suggest you pick up a book on the Scottish Enlightenment. I recommend The Scottish Enlightenment by Alexander Broadie. https://www.amazon.com/Scottish-Enlightenment-Alexander-Broadie/dp/1841586404