Breech-loading guns existed before the Industrial Revolution, but the more complex mechanisms required more labor, and careful hand-fitting, so they were exotic creations for the wealthier customers. With the advent of better machine tools, like calibrated metal lathes and milling machines by the early 19th c. , much of the labor of hand fitting was reduced, and making a breech-loader became feasible for mass production. The best first example of that would be John Hall's 1819 design, made in his shop at the Harper's Ferry Arsenal. Hall was a pioneer in the use of machine tools, jigs, fixtures and gauges. If he did not quite get to having interchangeable parts on his guns, he came quite close, managing to get repeatable operations out of his machinery. His design also did not need incredibly close tolerances in order to function- there was a small gap between the breech section and barrel that allowed the gun to operate even when powder fouling accumulated after firing.
But Hall's and other beech-loaders would be hampered by the problem of gas leaking around the breech mechanism- high-pressure gas. Hall's leaked quite a bit in that gap between the breech and barrel, and an un-aware soldier's finger could be hurt. It would only be the invention of the metallic cartridge in mid-century that made breech-loaders very practical. Along with providing a pre-measured charge of powder and an internal primer to set off the charge, the metallic cartridge case also created a gas seal, that kept the explosive gases contained. Once cartridge cases began to be used, better , faster-loading breech designs could be produced that didn't have to deal with the problem of sealing in those gases, and magazine weapons could be made that could safely store more cartridges, and fire repeatedly..
Merrit Roe Smith : Harper's Ferry and the New Technology