Yes, it definitely could have been so much better, just stopping visitors to care homes clearly wasn't enough. However because of the nature of the care needed I think even drastic measures may not have made much difference to the outcome. Possibly they could have been instructed to divide each home into sections, eg one section per floor and not allowed any mixing of staff between sections. However there would still be centralised risks of infection through the catering, laundry service etc. The residents will have medical needs so there are likely to be outside drs, nurses and paramedics coming and going. There are likely to be ongoing maintenance requirements, eg kitchen equipment breaking or pipes leaking, that mean outsiders will have to come in to do emergency repairs. No matter what the level of PPE etc, once the virus enters a group home like that it will spread because people are close together.
Perhaps physically moving the residents to other locations in smaller groups would have helped, but that's very disturbing for some residents and also administratively difficult especially at short notice.