Modern firearms need a lot of technology to be made, even simple bolt actions, lever actions, and pump actions only became possible with the availability of powered mills, drills, and lathes - all these interlocking faces are made on this heavy machinery. let's look at the inside of a John Browning design of 1879:

That breach loading, falling block firearm heavily relies on parts that need a very precise fit. While the final fit will be made with files (hand fitting) the rough work is done on mills. But how far back do we need to go to get out of the need for industrial tooling? Well, let's look at the history of firearms in Japan how far you can get without modern tooling and machinery:
Technological requirements for gun technology
As long as you don't want modern machinery tooling, you limit your firearms availability and design quite a lot to matchlocks and flintlocks, as these do not require low tolerance machining. The moment you allow somewhat crude machining and steam power (or a similar mechanical power source), the output of firearms increases massively as the barrel manufacturing gets much easier and parts can get preconfigured to an almost fit. Even with Flintlocks, the mere existence of good machining does result in advanced guns like the 1819 Hall Rifle where the chamber tilts upwards, allowing much faster loading than having to ram a bullet down the whole barrel - especially in combination with the paper cartridge invented at the same time. Their downside? They were more complex to produce as the parts had to be made all to one standard, it took Mr. Hall about 2 years to assemble the first rifle - because he produced only one set of parts, one after another, all to the same standard. Contemporary attempts at the same ould use jigs to hand-fit all other parts to achieve the same on a piece-by-piece basis. But they were also one o the first 'interchangeable parts' guns that would become the dominating type 100 years later.
To allow percussion caps, the next logical step on the way to fully self-contained cartridges, you will need advanced chemistry and somewhat precise machinery. The next step on the way to the fully self-contained cartridge demands developments in the stamping/pressing of brass to create the shells. The first ones will be rimfire, adding the primer into the bulge of the bottom, and only later centerfire.
The moment you allow precise machining with only some hand-fitting afterwards needed, you also unlock most of the Browning designs. Note that John Browning singlehandedly dished out more than 120 patents on firearms and firearms parts, and in his lifetime guns went from percussion cap tilting breach blocks like the 1843 Side Lever Hall Carabine by Simeon North over his (above shown) early centerfire breach loading falling block, cartridge fed lever guns (his invention) and bolt actions beyond.
Hand-cranked revolving cannons like the 1872 Hotchkiss revolving gun use a similar mechanism to the 1861 mechanism invented for the Gatling gun, automatically extracting and inserting shells. These guns are just a tiny step from fully-automated firing using some clockwork. But the main limiter for gun development to rapid-fire was not the mechanical problems. In the US, the ministry was concerned about the ammunition supply chain and thus did not adopt the Henry/Winchester.
Once machining gets even more precise, you are in the area of about 1850-1890s machining tech, but you also unlock guns with totally interchangeable parts. You get bolt actions, and once you have bolt actions, the step to semiauto guns is not that large: the Ross rifle experimented on semiauto and even full auto, using a bolt action core! The ability to the first fully automated machine guns happened for the most part in the late 1890s and into the world war years (such as the german 08/15, the 1915 revision on the 1908 machine gun), but small caliber self repeater development mostly happened in the interwar period. Adoption of semiautomatic and automatic weapons for the whole army only started in the second world war, when stamping technology had advanced so much to allow almost fully stamped construction and thus mass production.
Volley Guns
A type of gun ignored above is the Volley Gun, where firing the gun does fire a number of barrels in rapid succession. These guns came up very early - reports from 1339 indicate the use of multi-barrel cannons that only needed to be triggered once, there had been 14-barrel flintlocks and in the 1700s the Nock Volley Gun was a typical armament on ships. These "rapid-fire" guns and the similar mitralleuse can't be stopped in their firing cycle, but ultimately are pretty much machine guns/cannons in their own right. Making them is often a thing of casting and, and does not need highly developed machining in the crudest forms but can become quite intricate in smaller calibers. Once the paper cartridge with percussion cap or self-contained cartridge is available, all-barrels-at-once firing is a rather simple task.
The History of Firearms in Japan - an example case of frozen technology
Generally, we need to take in mind that Firearms had three distinct periods in their pre-Worldwar development in Japan: Their initial arrival to the battle of Sekigahara, the Edo period, and then the Meji period onwards.
Note that the guns in the first two eras were manufactured in handiwork without machining. Each one had parts made for this one gun; even if gunsmith workshops might produce repeated parts for one of their models in larger quantities (like the flat springs), there was a lot of individual fitting, making each one unique to some degree.
Arrival and propagation
Firearms were not invented in Japan. First, some kind of grenades came with the Mongol invasions. Next came hand cannons and larger, and quite early wooden artillery from china in the 12 to 1400s by trade. The Japanese would adopt the wooden cannons for sieges - pretty much a treetrunk drilled out and given a hole on the side to light the powder and some bands to secure the gun. Neither the hand cannons nor the wood cannon was easy to use, aim and the latter wore out fast, allowing at best about a dozen shots before the gun is useless. Hand cannons, cast in china, also were hard to manufacture, and as a result, neither of these found widespread adoption.
However, the matchlock type that arrived in Japan was already outdated when it came to there, most likely via Portuguese travelers or shipwrecked people 1543. It's hard to say which design it was - a Chinese copy of a Portuguese design or an Ottoman copy of a Portuguese design that was brought to china first. In any way, it wasn't the state of the art in Europe and about a decade behind the developmental curve there.
The first adoption in larger quantities came around 1549 - about 6 years after their arrival. That Year Oda Nobunaga ordered 500 firearms. An advisor of his reports, that just boring the barrel by hand for a gun would take about a month, so it hints heavily at the number of gunsmiths employed just to outfit those guns within a year or two. Note that this massive adoption does come from the relative ease of training: it takes about a week to train someone to be a decent gunner, but years to be a decent bowman or artillerist with wooden cannons and mortars. But training didn't stop then: The Oda tactic was to have the gunmen rigorously hold rank and fire in volleys, switching out the front line to reload after each volley. The tactics changed vastly.
In 1563, some minor clans clashed and the resulting battle had 33 confirmed woundings with teppo, in a battle that had only 12 other woundings! So by this time, firearms had gotten their way into normal warfare. In 1570, 7 years later, Oda Nobunaga fielded 3000 firearms in the Battle of Anegawa, making up 13% of his total army of 23000 (not counting allies on either count here). These could fire a volley of 1000 per minute continuously. These battles would mark the moment tactics changed dramatically, and the next big one was to cement the changes:
The 1575 battle of Nagashino pitted the Oda and their Tokugawa allies against 12000 of the Takeda cavalry troops. Among the 38000 troops on the oda side, about 1 in 4 was armed with a Tanegashima. While the Takeda had previously won against armies outnumbering them 3 to 1 with their heavy cavalry tactics, the heavy reliance on rigorously trained gunmen that shot in volleys did break the Takeda clan's Warmachine. Cavalry, having become the Takeda trump card in open field battle just some decade or two ago, suddenly was obsoleted. Positioning, simple stockades and logistics had become the trump card in warfare pretty much overnight.
The 1592 Invasion of Korea by Toyotomi Hideyoshi had a contingent of 150000 men with firearms. This accounts for 25% of the whole army and outnumbered the Cavalry! Note that this invasion also introduced relatively modern firearms to Korea, even as the Matchlock gun was outdated when it had arrived in Japan about 50 years before!
Then, the battle of Sekigahara happened in 1600 and by 1604, the Tokugawa shogunate was firmly established, leading to the next phase. First, however, let's look at some domestic solutions.
Domestic solutions
As wooden artillery was unwieldy, the design was adopted and increased even during the Sengoku Jidai, leading to rather massive, cannon diameter guns that had the exact same mechanism as the normal Tanegashima - and they filled the gap of field artillery and door breakers. Short variants - carabines - were introduced in that period too, but again, it was just a simple adaption of the same design with different barrel size.
A big thing that made innovations hard in japan at that time was, that there were only two types of springs known: the leaf spring - a flexible stretch of metal with maybe some bends in it - and the coil spring - a metal band that is wound around an axis. The Helical spring, which the Europeans invented in the 15th century wasn't known and its manufacturing was impossible for the craftsmen.
As new technology wasn't brought in, the domestic recombination of inventions leads to the Japanese developing domestic solutions to problems that Europe never solved for matchlocks. For example, the simple addition of a string in the front and back to stand on for night fighting, lacquered boxes around the mechanism to waterproof and hide the burning match. Designs of sheet metal appeared for sure in the early 16th century, but lacquered paper and wood are thought to have been its predecessor.
By altering the method in which gun barrels were made from boring the barrel to smithing them around some other piece of metal it wouldn't weld with, the time to make guns was reduced in the later times and it gave some of them polygonal barrels that were less susceptible to fouling. Some even had pretty modern barrels.
As a rather ingenious solution, there are records from the 1600s about bamboo tubes containing (from back to front) some flammable plug (paper or linen), the powder charge, wadding, and then the bullet. These were sealed in some way, possibly with lacquer. These cartridges would be put on the barrel and their contents rammed into it, pretty much functioning like the paper cartridge - which only was invented in 1808 - but if sealed correctly also made them waterproof. All that was needed to fire was some powder in the pan and a lit match. This sped up firing volleys compared to the same tech level European troops - according to tests made nowadays and battle accounts, the use of these devices allowed to shoot up to 6 times as fast as without.
Edo Period / Tokugawa Shogunate
During the Tokugawa Shogunate, there was no need for developing better guns. However, one of the early decrees was to confiscate military caliber guns from private people and lock them up for guard use.
So, the gun crafting was perfected instead of developing new solutions: the guns became more elaborate, civilians had made their guns in smaller calibers, and even matchlock pistols were developed. The small caliber rifles were pretty much hunting implements. Some of these short guns got humongous diameters (and deemed ok as they were inaccurate to hell), and some gunsmith actually made some kind of revolver with a horizontal drum. Others made hand cannons really short. They all became more decorated. But there was no pressure to innovate besides the desire for novelty guns as representative objects, no modern tools to make the hardworking easier. In fact, a lot of technology did stagnate in this period.
Meji Era and beyond
We know, that the end of the Edo Period had 200 master gunsmith that created all guns in laborious handiwork, each of them had assistants and trainees, so it's better to assume these are workshops. We can assume that the number of gunsmith workshops was even higher during the Sengoku Jidai, when firearms came to Japan. But now, Admiral Perry arrived in 1854, disturbing 250 years of isolation. What was the immediate response of Samurai? They bought modern firearms and cannons. When in 1877 the last Samurai battle was fought, both the imperial army - outnumbering their enemies 40 to 1 - and the Samurai in Shirojama were armed with modern firearms and cannons, though the encircled defenders did field a hodgepodge of them and old Tanegahima and wood cannon artillery. The last charge of the Samurai into the advancing army on the morning of the 24th September came only after the defenders had shot every single last bullet into the sieging army.
Japanese firearms development in the following modernization was mostly import and reproduction and in the interwar period closely followed the European and American designs, often reverse engineering other countries' guns and then iterating on them. However, you should listen to Ian "Gun Jesus" McCollum about the interwar development, though he might have the occasional pre-WWI gun in his repertoire.
Extrapolation
If we want to keep the methods of the Edo period, we can only introduce so much in machining technology, possibly by introducing water hammer mills for smithing the barrels. But the limit on machining tech also means that we might at best turn matchlock to flintlock, without changing the character of the whole process.
The moment we want the percussion cap or the following self-contained cartridge technology, we demand quite some machining technology as the means to repeatedly and reliably form the caps as well as the ability to make the thin metal sheets needed for the process, which requires roller works, and quite a lot of modern chemical knowledge about initial explosives.
Propagation of roller works also means metal sheets are cheap, thus plate armor is plentiful and cheap, but at the same time obsolete due to the firearms. The chemistry that brought percussion caps also brought other advances, for example in the mining and farming department, increasing output. You don't necessarily need steam power to have bolt action, but just to have the means of making them you need strong tools, advanced alloys, and chemistry, which means you are far out of the medieval world the moment you have percussion caps. To stay in 'medieval' area, you can't go past flintlocks, so at best you have the above-mentioned Hall rifles in their 1819 variation, possibly with side lever.