I'd rather suggest to train children in swimming as soon as possible. Even if swimming pools would be banned, there are private pools, there are lakes and rivers and creeks and canals and oceans and shores, there are ships that sink and idiots that push you down a bridge. The drowning rates are especially high in countries, where people are not able to swim. I know this from the Sudan: people do not learn to swim in the desert (and not in the cities, because there are no water parks). Everytime a boat capsizes in the Nile (and this happens unfortunately too often) all of the passengers drown, just feet away from the shore, because they are unable to swim. A couple of years ago the entire national soccer team of Sudan died that way.
Being able to swim is an absolutely necessary survival skill and kids should learn it before they start to read and write!
In Belgium kids are send to the pool at age ~7 until they are 12, weekly for an hour or so. And it's part of your education (but you don't have to pass it if I recall correctly but I could be mistaking).
It's about the same in Germany, swimming is part of the sports curriculum, and you have to pass. You're also encouraged to get certified for basic water rescue and things like that. Knowing how to swim is such a basic skill.
One thing I really like about German pools and something that makes me really nervous when watching Americans: non-swimmers and little children should not even be in the deep pool. Most facilities in the EU have a dedicated shallow non-swimmer pool - and then there's a separate deep pool for "serious" swimming. Many also have an extra pool for toddlers. I'm somewhat puzzled how in the US small children and people with inflatable toys are all sharing one big free-for-all deep pool with the adults.
That's the problem, in my opinion. If you're under a certain age or if you can't swim properly, you have no business being in a deep body of water.
Being able to swim is an absolutely necessary survival skill and kids should learn it before they start to read and write!