Writing off stuff only works out if there are profits to write it off against.
In any case, you still have to spend the money and many property owners are not making any money on rentals these days.
These kind of problems don't have easy answers. No one (including the owner) wants unsafe conditions. The thing is not unsafe now by the standards of just a few years ago. It is only because the standard of what is now considered "safe" has changed over time, in this case at least arguably in part primarily to enrich a manufacturer of a new product that could not sell ten of these devices except for the fact that guys with guns force people to buy them.
I suspect a lot of unpermitted (and potentially truly unsafe) work goes on largely because there are no good answers to the overreach of government. A fair number of people directly benefit from that overreach and they are pretty vocal because they would be out of luck without it.
The government agencies only provide the inspections, they are required by the insurance underwriters, not an overreaching government, when more people that try to understand how the permit process works, the more concerned they will be, with protecting their property with permits.