An important factor seems to be precision engineering. I saw the point made in The Perfectionists: How Precision Engineers Created the Modern World by Simon Winchester, where they argue that while all the science and experimentation was there, it wasn't until precision parts were widely available that steam engines really solved all their problems and became viable https://www.goodreads.com/book/show/35068671-the-per…
As part of the foundations for rapid technological advancement, standard weights and lengths were put into place by the crown... and that then allowed the foundries and factories which made the parts to specialize instead of needing a master gunsmith to craft each part for each gun, you could have many lightly trained people making the parts and then the gunsmiths only needed to assemble it.
At a point later in the series, one of the characters on the other side of the war demonstrates this by taking three rifles and disassembles them, and then reassembles a working rifle with parts randomly selected from the different three disassembled rifles and asks his leadership if that was something that they would be able to do (it wasn't).
This in turn allowed for tighter tolerances for the weapons of war which then in turn meant more powerful weapons and being able to out produce larger nations even with a smaller industrial base.
Consider the question then of "at what point in the history of the world could you take three rifles made by the same maker and swap parts and still have it be perfectly serviceable?"