Well insurance is one solution. Other ones might include avoiding self-management, not being so lenient on tenants in arrears, more regular inspections, better vetting of tenants, etc etc
Hard to say what might work best when trying to avoid that situation.