It is well known that Edo-era Japan had many fires, but I want to focus on something else.
I cannot seem to find much information on fires in Japan before Edo. For example, when I google "feudal Japan fires," the first result is about fires in Edo, which is not feudal Japan.
What I found is that in Miyagi, a "Fire Prevention Tiger Dance" exists and it was invented over 650 years ago. The dance originates from a Chinese belief that the wind would obey tigers.
Fire was as common in pre-Edo (i.e., Nara, Heian, & Kamakura) Japan as after as the architectural basis for construction did not change on the large scale-though it seems that not as many studies quantifying these fires have been carried out.
Rituals to avoid fires date to much earlier than the Miyagi one you refer to. I saw references to fire-preventing rituals that were imported from China by the onmyōryō along with the onmyōdō that were intended to protect the capital city from fires (and diseases). This also led to occasional bans on specific colours, such as red, as in the 950's.
Fire is described as "a catalyst for the enactment of change in architecture" in the Heian period, "compelling rebuilding but also offering the opportunity to reassess architectural design according to changing political imperatives".
Our attention is once again directed to the Sanjo Palace fire and the searing destruction of the flames depicted in that immortal scene. The inherent flammability of the materials employed in the building of the shinden mansions meant that they were in constant danger of destruction by fire. The indigenous preference for roofs of cypress-bark shingle, and for interiors illuminated by oil lamps and divided by papered screens and flowing silk curtains, was a sure formula for disaster. In the twelfth century the tendency towards conflagration of shinden-zukuri palaces and mansions was exacerbated by civil disorder in the capital.
-Coaldrake, 'Architecture and Authority in Japan'
The same book also describes this impermanence of (important structures) imprinting itself very heavily into the Japanese consciousness.
Some specific fires which are mainly noted with reference to important structures and rulers' palaces, but it is likely that much of the capital cities suffered if the 'most' important structures also got destroyed:
- Destroying the Ise shrine in 792;
- Destroying the Otemmon palace gate in 866;
- Destroying the Great Hall of State in 876;
- Destroying the Residential Compound in 960;
Built in 794 after the move from Nagaoka, Heian Palace survived unscathed until 960, but during the next 122 years, fourteen major fires are recorded.
- Destroying the Tsuchimikado Palace and the Imperial Palace in 1016;
- Destroying the Tsuchimikado Palace in 1031;
- Destroying the Tsuchimikado Palace in 1064;
- Destroying the Great Hall of State (again) in 1058;
- The Great Fire in Kyoto of 1146;
- Destroying the Tsuchimikado Palace in 1148;
- The Great Fire of Angen in 1177 (the link includes a quote from the Hōjōki);
… burned down the Sujaku Gate and the Daigoku Palace…
- 1178 fire in Kyoto;
- 1180 fire in Kyoto during the Genpei War;
- Destroying the Greater Imperial Palace compound in 1227;
- Destroying Kamakura in 1333 as the bakufu was overthrown;
- Destroying the Shariden temple in 1563;
- Destroying Azuchi Castle after Nobunaga sacked it in 1582.
As noted, many of these fires are also reflective of civil strife, but clearly not all of them. In particular, Coaldrake specifically says that study of Heian architecture is so difficult because the buildings that 'date' from that period (in the Japanese sense) have been rebuilt after countless fires so that nothing remains of the Heian originals.