They certainly didn't have mills as we know them in the 1700s, but lathes, drills, and subtractive manufacturing had been in practice for millenia. You could say they were "machined by hand". Most early firearms (barring large-bore guns like cannons) were made from forged steel or iron, which is significantly stronger than cast iron due to its lower carbon content and regular grain structure. These forged parts were then worked on by gunspiths with cutters and abrasives to produce parts in tolerance for their mechanism. Cast iron (or more typically in early warfare, bronze) was suitable for cannons and large-bore guns due to the mass of the finished gun; more metal meant that the gun could withstand more shock, but even then they could fail catastrophically due to material fatigue or failure.
Well, the kind of guns politicians are afraid people will make at home are not intended for durability. But things like street crime, school shootings,etc.. where it's just a one and done affair.