As a practical addition to the other answers:
At least in Germany, many public swimming pools have a solution addressing this problem: family changing rooms or family locker rooms (Familienumkleide). These are mixed-gender changing rooms which are specifically intended to allow families (or a parent with a child) to change together. In Germany this is typically a single large room shared by all families needing one; sometimes and in some countries there may also be multiple family changing rooms for a single family each, instead of one large room.
A casual web search shows this exists in other countries as well, so you might check if a swimming pool has one. I have used them together with my small daughter, and found them a very practical solution, easier than trying to cram two or even more people into a changing room intended for only one person.
If a facility does not offer family changing rooms, they may have single-person changing rooms (basically many small cubicles). In a pinch, you can probably use them with two persons, so father and daughter or mother and son could share one. This is usually not practical with more than one child, though.