The best hypotheses I've seen (which I can't find, it was in passing long ago somewhere), suggests European division fueled a lot of later innovation. War does seem to drive technology. When you're China back then, who are you really competing against? You've already finished the conquering and unification phase that individual European countries are still dreaming about. So why do you need guns? You're essentially Rome of East Asia (and Romans are no more, perhaps not a coincidence). Korea, Japan, and Vietnam are either vassals or non-threats. You've got silk, porcelain (which itself was pretty amazing compared to "European" alternatives), and tea to pass your time instead (and to trade with). You're already pretty huge for the time period, and managing a country of that size and technology level is already pretty challenging. Meanwhile, Europe is a perfect climate for border skirmishing and competition. When England came knocking on China's door in a more aggressive fashion, the Emperor at the time still had arrogant delusions about China's comparative might. And they paid for that. But the opium wars and WW2 were a wake up call.
Also, glass. China never discovered glass, and glass unlocked all sorts of technologies.
Edit: So the other way of looking at it is: The Han tribe did get ahead of their neighbors with all their fancy doodads early on, and perhaps that's why China is the size it is now. The Romans almost did it in their local sphere, and arguably England later, although by then technological spread was more uniform. If ancient Europe had been sitting next to ancient China, perhaps they'd be speaking Chinese now?