The majority of major works needed for a block of flats can (and should) be planned for in advance.
In fact, to be compliant with the Landlord and Tenant Act 1985/87, it is the responsibility of the management company or freeholder to do exactly that – plan ahead, consult with tenants and set aside funds for major works so that nobody gets landed with a huge bill out of the blue.