I mean, it's skill based. Just create a team that can withstand multiple move-types or get Pokemon with a diverse moveset so you can counter your weaknesses.
If you could also change Pokemon whilst not knowing what your opponent will swap into it would be a completely random match-up; similar to a start of a battle where first turn swaps are regular. It would essentially break the meta...