The political treatise Arthashastra, attributed to Chanakya (Kautilya), dated to 300 AD, does not romanticise the role of the temple in ancient India. Image of the romantic Hindu temple as a sacred space, untainted by politics and money, does not exist in Arthashastra. In fact, Kautilya understood temples as repositories of wealth, with faith encouraging economic activities, and to be skillfully navigated by a wise king.
Consider the context. The author of the Arthashastra predates grand temple complexes becoming a fundamental part of mainstream Hinduism and a significant component of a king's political power. This would happen some 500 years later. During Kautilya's time, temples were not built for the upper classes. They were wooden shrines for the subaltern.