Generally it's a good idea to keep all the flanks in one area. Look at an official map like Badwater, Granary, or Gorge. The flanks are all centralized around the main combat areas. There aren't any long hallways that lead off to some obscure area far away from combat, or halls with 4-5 separate doors leading off to different rooms. If you follow this rule, she number of flanks should be determined by the map itself because you shouldn't have anything that leaves the main area.
You made a mistake there. Badwater has a major area near cp 2, and it has some lesser ones near cp1 and cp4. Badwater is one of the few maps that shows the beauty of good flanking. The areas feel a bit away from the map, but are still close enough to never be empty of combat. Its a map designed in a way where taking over the flank is a primary task to proceed.
Flanks should make sense and people should be triggered to take them. In badwater they did that by making the main path a narrow bottleneck. This made the flanks a main combat zone since using the main path often results into death.
But still, the flanks are still somewhat the same area, and that makes them good. People see the area being there, they know they can walk ik but still try to avoid having to go there.
Upward shows the same trick by making the high ground at cp2 the flank and the underground path the main path. You seperate players completely from each other but they can still swap the paths fast enough.
For payload its normal to have 1 main path, a primary flank, and a counter to the flank (3 paths which are often quite close to each other).
For linear CP maps they however seperate it to 2 paths in which the player can be countered by players taking the other path.
And for A/D CP maps they often have 2 main paths for a cp, and a 1 way flank to support both paths by harrassing the strongest defense positions.
And another thing to watch for. Players dont look around corners when searching for paths. They only look straight forward and only look to the sides when they face a wall. If you make a U turn that leads into the flank then its most likely going to be missed as flank as they will just walk forward. A T or Y shape however doesnt stop them from taking a flank as its just left or right