Flats Toilet Overflow issues with tenant

I am buying a property which previously had a toilet overflown that caused whole flat’s floor damaged and now refloored and renovated. It is fixed now but not sure if i will happen in the future.

So assuming I have to buy this, is there anything i need to do?

  • e.g. is there any thing that I can hedge against any possible odds with a tenancy from using insurance or anything you would recommend?

  • i.e. is there a insurance covering items damaged caused by toilet overflown due to communal waste pipe blocked and overflown to the property?

  • Is there any insurance for covering cost from causing the property to be inhabitable so i lose rent or tenant want compensation e.g. cost for temporary place to say?

any suggestion helps!