You don't have to do a full lockdown if you just want to protect nursing homes; isolation of just the nursing homes/other high-risk concentrated populations would have the same effect on those inside
And their staff. And all family members of their staff. It's not "impossible", but I don't think any countries have attempted such a nursing-home-only lockdown.