That "flattening the curve" isn't going to cut it was obvious to people that thought it through from pretty early on (if you look at the capacity of the healthcare system of your country, and look at how broad the curve needs to be, you end up with "years" for any country I looked at). So, the game plan is to hold out until a vaccine is found and tested. Putting the whole population under heavy measures for that long isn't going to work, so you impose very restrictive measures until containment (tracing infected cases and quarantining those that might have been exposed) is feasible again, all the while taking care that you don't allow big explosions of infections (like they had with one patient in South Korea).