The answer to this problem is actively sought out by various government agencies. From gradual re-openings within borders, to the conditional re-openings at borders (such as travel bubbles), these policies and measures are already starting to be implemented in many areas.
The most important supporting measure after a lockdown – apart from wearing masks, social distancing, and frequent hand-washing – should be epidemic surveillance. This means monitoring those in home quarantines and self-isolation. For example, once a confirmed case is discovered, the history of who they came in contact with needs to be determined in the shortest time possible. Once those potentially infected people are discovered, monitoring them and possibly enforcing home quarantine and self-isolation is a high priority.
When monitoring is not automated, the staffing required will be massive and it may not be possible to execute quickly. A failure like this could cause a large-scale community-based spread of the virus that cannot be traced, which would then lead to the city needing to return to lockdowns yet again.