4 is a recommended party size for DND 3e, 3.5e, 5e, PF 1e, and 2e.
I don't know where you got idea that party should be bigger
I allways presumet that this precedent is made on the fact you have 6 stats ...
So you get tank, focused on Con, some meele for Str, some ranged for Dex, some heal with Wis, some magic ranged with Int, and some social with Cha.
Then you should be prepared to anything.
But maybe im wrong, im kinda cooking from water here. :-/