In that period, a mechanical device such as a pump was well regulated when it was functioning optimally. They certainly did not mean highly restricted by the government. Neither "well" nor "regulated" would have been used in that context 200 years ago. Well regulated = peak shape, performing optimally. The founders wanted a well trained, experienced, at the ready citizen led militia.