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:
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.