That look like a big project lol.
Random idea:
A maintenance cost. If the building upgrade. It's would "broke" until fixing that will upgrade it's quality at the end. This way we could simulate the "cost" in rss of having quality upgrade. And the more the building is in quality level the more it's require normal item to be fixed.
For example, normal would require 10 item to fix, uncommon would require 100 normal item, rare 1000, epic 10000 (lol). You would have robot to fix the entity increasing the counter until the building is fixed upgrading it's quality.