Dehaven's factory (mentioned in one of those documents) has been well researched, especially in an article some years ago by Wayne Heckert: “Rifles and Muskets on the Swatara: Clandestine Hummelstown Factory Armed the Revolution,”
KRA Bulletin 34, 1 (2007): 3-6. There is tons more information in the PA State Archives about that factory that Wayne didn't use, though. I totaled up all the receipts of payments to Dehaven once and came up with the numbers that I used in the text below:
Dehaven's factory was originally established at French Creek & was removed to Hummelstown in 1777. It began its life as a lock-making factory but soon became an all around repair factory, which Dehaven supervised. By early 1777 he had “Nin[e]teen Men at Work in the Gun Way,” which, he hoped, would enable him “in a Short Time to Repair A Great Maney arms & Make Some New ones.” The state provided substantial funds to keep the facility operating. Surviving receipts from July 1776 to February 1778 document payments of £21,950.0.0 to Dehaven and Carter (and £700 more to build barracks and recruit a company to guard the works). This factory was disbanded in January 1779 and its contents sold to Rittenhouse, Dehaven, etc.
Miles and Corger aren't related to the gunlock factory. They're being paid to make rifles (or supply them), like hundreds of other gunsmiths (or larger contractors) across the state in 1776. There is a desperate attempt to supply arms after the quota system (requiring each county to make a certain number of arms) fails miserably. This is when/why Pennsylvania licenses officials to disarm non-associators. The issue is less that they're worried that the non-associators will bear arms against the patriots than that they need every arm available and non-associators' arms are going unused altogether.
Not sure where Miles & his partner were located but the
American Archives series records some payments to Miles for rifles delivered to a couple of captains--so figure out where the captains were & you'll know where Miles and his partner was:
https://www.google.com/books/edition/American_Archives/SjlDAQAAMAAJ?hl=en&gbpv=1&dq=%22Thomas+Miles%22+%2B+1776+%2B+rifles&pg=PA1329&printsec=frontcover