The Gonzenbach family had made their money in the textile industry, so after their arrival, the farming village evolved into a textile producing factory settlement. The industrialization was beneficial by providing wages and easy access to water power (five artificial ponds were built). In 1664 Hauptwil was given the right to hold a market. The Castle was built in 1664-65, and in 1661-71 approximately forty new manufacturing buildings and worker housing were built. At the end of the 18th Century the Brunschweiler family of Erlen settled in Hauptwil. During a stagnation in the textile industry, they built up the dyeing industry in the village.