What had happened to explain why this lead never led to“modern” science in China? The great margin between theories and practice killed science. More detailed, Absolute Monarchy killed science in practice while Confucianism kept science away Ideologically.
In many ways, theories in ancient China are prosperous (not necessarily advanced). And technologies in ancient China are advanced (yes, advanced and much more advance than the western world). However, Absolute Monarchy stopped theories to apply to practice and therefore killed science.
Hierarchy of Absolute Monarchy is extremely harmful. On the one hand, it stopped applying theories to practice. In tradition, researchers who work in theories rank much higher than artisan (engineers). Hierarchy stopped researchers work with artisans. There’s another view: Capitalism is the mother of modern science. And the reason for this is that trading needs math, sailing needs physics. In addition, though trading and sailing exist in any kind of society, Capitalism needs those two much more than other kinds. Capitalism needs trading and sailing desperately. Theories are meaningful to capitalism after they are applied to practice. In short, Capitalism encourages to apply theories to practice while Absolute Monarchy stops this procedure from happening.
On the other hand, Hierarchy requires ancient researchers who haven’t ranked high enough (which are most of them) to convince their boss in a short period of time. Usually, the emperor will not spend any time arguing with you. So they tend to use the analogy to express ideas. Which is basically opposite to the deduction which is crucial to modern science. Meanwhile, Absolute Monarchy means to comply while democracy means doubts. So here it comes to the mind level.
Confucianism cares about social problems and only. In other words, if Taoism takes control of China instead of Confucianism, science might appear in China much earlier than the time of Galileo.
Confucianism killed science indirectly by controls public in mind which prevent Capitalism take place in China, even though iron processing technology is much more advanced in ancient China.
Confucianism suggests to governing without interface. Do without doing. This kind of thoughts conflict with the practical spirits of experiments which is crucial to modern science. There’s a great example of this: I Ching. This book explains this world in a schematic way. If you apply the system built by this book, you no longer need to observe this world nor practice. That’s how science is killed.
Science is unplannable. You need to provide a proper environment. After that, all you can do is to pray for seeds to germinate. So in a word, the answer to the Needham Problem is that ancient China is not the right environment for science to germinate.