Testing and tracing has already been tried and shown to be more or less impossible in dense cities with no immunity. It’s not for lack of trying that many cities failed to contain the outbreak in February. Granted, it’s a lot simpler when people are aware, but it’s still likely that cities will fail again as soon as people move about normally.
I suspect a reasonable middle ground strategy is to aim for just some immunity (say 15% or 25%) while not overwhelming healthcare, after which tracing and isolation has a chance of working while also allowing a somewhat functioning society (Note: I mean for dense cities. This could still mean 5% in a country, as in Spain for example).
The hard part is ensuring that as few as possible of those that are infected are in risk groups. This is something that proved difficult in many places.
There is a set of restrictions that allows the aggressive testing/tracing/isolation work for a naive population, and a different set of restrictions that is sufficient for to contain the spread in a population with 20% immunity. My feeling is that the former set of restrictions isn’t viable in democratic countries, or sustainable for the time we are talking about (1-2 years) without leading to something that costs more than is won.