Short tl;dr on ults in team building. Basically you need to structure your ults in a way so that you can win fights using only 1-2 uts a fight and so you don't waste combinations. I'll use classic 2/2/2 as an example.
Rein: Teamwide CC ult, strong engage. Can use this single ult to win a fight, or combo it with a single ults.
Zarya: Really similar to Earthshatter. If you use both grav and earthshatter in the same fight you probably really fucked up since you basically just did the same ult twice.
Genji: Sword is a good engage if you have nano. That's 3 ults to engage with. Sword can combo off grav and earthshatter well too, but it might be overkill. It's probably better to hold it just nanoblade, but can be used in a combo if you have to.
Soldier: Visor is a shitty engage, but good clean up and good post shatter. Also a decent nano target. This is the one that will be used to clean up fights if grav or shatter didn't already. If you visor into a grav you're an ape.
Ana: Nano sword or visor generally. Nanosword is hte best combo here sinc eit gives you a 3rd engage option.
Lucio: An emergency button tht can be held since you probably don't need the engage on it since you have so many better options.
Example 2: Dive and ults. Dive comp relies much less on ults to get wins, and since their ults are much more llimited you have to think about them a bit differently.
Winston: Good ult to use early in a fight or as an emergency button. Is kind of low impact though, so it's not going to be something you rely on heavily to win fights.
Zarya: One of two engage ults in here. Extremely important because it is the only AoE CC in the team. Combo with pulse bomb, not with sword unless you really need it.
Genji: The only other engage ult on the team. Nanosword is crazy and should be used in fights where Grav + Pulse isn't available.
Tracer: Random pick ult sometimes, other times extremely important to combo with Grav.
Basically, you alternate fights between using nanosword and using grav+bomb. If you're forced to use grav + sword in one fight, the next fight will be way weaker for your team because you just won't have an ult you can throw out into the enemy team early to start the fight. Nano can be thrown on not sword, but again since nanosword is important to winning fights considerations have to be made.