There's playing for fun, and there's playing to win.
Generally, for a team to be successful I'd say that a total of 3 spies and snipers combined (3 total, not 3 of each) is the max. Engineers are great at defending points and intel, so long as they know how to deal with spies. The number of engineers is less of a problem, as long as they know when to move their stuff up and where to put teleporters and dispensers to aid the team. If you just rely on your sentry, your team is likely to leave you to your fate instead of helping you.
As for pyros, they depend on the map. Granary, for instance, is great for pyros on battling the middle point, but less so for defending a second point. Pyros should always use either vanilla flamethrower or degreaser, though, for the simple act of putting out teammates on fire. Airblasting projectiles is useful, but not everyone is good at it, and it's not a requirement. But put out teammates: It earns you points, helps your mates stay alive and provides them the health to help defend you from baddies.
My main gripe is soldiers with the Direct hit and heavies who do not use the Sandvich. I main in soldier and medic, and when playing medic I've learned never, EVER to uber a DH soldier unless they have proven that they can get consistent kills. As for heavies, a simple plea:
If you see your medic taking damage, turn around and help him. If there are no immediate enemies and your medic is hurt, give him your sandvich. Trust that your medic will heal your wounds no matter what, and don't stop to eat a sandvich even if you're below 50 HP. Learn when to retreat, remember to turn around periodically to check for spies, and don't ignore damage you're taking. Way too often do I see heavies being pelted with rockets while trying to kill a lone scout, and ultimately dying while I try to flee as a medic.
All in all, take care of your medic and your medic will take care of you.
This is all just if you're playing for srs. Generally, if you want srs game, don't go on insta respawn 2fort servers, and vice versa.