Great answer by jpatokal. One more thing to add to the kaimyō topic is that Japanese temples are run by private people as a business under something you could call a "religion business license" which is 100% tax-free. These businesses however do not only operate religious services such as funerals but also a lot of other non-religious operations such as golf courses and even love-hotels. As an effect people running temples in populated areas are very rich. So as long as there are people, they have enough money to renovate the temples.
On top of that, the renovation costs are relatively low since temples in Japan are mostly made out of wood and much smaller than a European church. So on top of them being (relatively) easy to renovate, they do not remain visible for a long time after being abandoned.
An exception would be if you are running a really old temple with antique rooms and artwork, some of the items in the temple can be VERY expensive to renovate. The replacements of special types of wood, renovating old 60-meter high statues and other items can quickly rack up a multi-million dollar bill for a few square meters - if the temple has the wish to stay as grand as in the old days.
However, these old temples have a quite high amount of visitors therefore receive a high amount of money. If you go to any temple, most of the items you can interact with are charging money to do so. There are parks to visit, donated sake barrels, lucky draws, boxes t throw coins in, papers and wooden plates to write wishes on and sometimes papers that are stuck on the windows of stone lanterns. All collect money and are used in large quantities by tourists and local residents alike.
Just to give a better example how seemingly mundane things can cost a fortune in Japan, I recently visited a very old (non-religious) building in Nara, where I was informed that the replacement of the main wooden structures in tea-room alone (only 9sqm large) would cost more than 2 Million USD to replace, specially because of the "tokobashira" beam and other wooden structures being so expensive.