How do you counter a heavy Torb/Bastion defense on Hanamura B?
Solution 1:
Recently I was the defender you described. We didn't have a Bastion but we had a lot of Torbjorns.
What you are looking for is someone who can do a lot of splash damage from a good distance. While defending B my concerns were D'Va ult, Phara flanking from behind (generally anyone that can scale the left side where there isn't a path - had a Reaper few others come behind us a couple of times).
But the hero that annoyed us the most was a JunkRat. He was sitting nicely hidden in one of the rooms with a health pack and was spamming his primary fire. While doing so he'd bounce his balls on the walls and generally land them around us. He did quite a lot of damage and what probably saved was me getting really angry at him and going solo (even ulting to stay alive) and hunt him down.
More situational would be a well placed Hanzo ult, that would go trough the most entities.
TLDR: Junkrat behind a cover will do the job.
Here are some compositions that do NOT work: (But can be found in the answers bellow)
Solution 2:
As you somewhat mentioned, the most difficult part of this is going to be the timing and team coordination rather than what the actual team composition is. This is one of the situations that makes playing solo somewhat more difficult.
Having said that, depending on your team situation, you might need to pick something that compliments what your team has already selected. In the case of a lot of Torbs/Bastion's, I would pick something that forces the Bastion to get out of his stationary mode. Things that can be good for that: Hanzo's ult, Junkrat's primary fire, Pharrah rockets, etc.
Depending on your team's willingness to coordinate, sometimes Roadhog can be good against Bastion. If you can get close enough it'll either force him to move for fear of being hooked, or he'll get hooked and die.
As someone supporting your team moving into position to accomplish these things, you might want a Reinhart or even Mei. Even though Bastion melts the shield very quickly, the idea is getting close enough that you force the Bastion out of position, or at least get close enough that people can use ults or do some damage.
You can also attempt to get beside/behind them from the ledge on the right (if you're on offense) and the staircase that goes down to the hallway behind the point. Tracer, Reaper, even Junkrat might be good for this, since you can get to that spot relatively easily on those heroes.
So it depends on your team's level of coordination and communication. In most cases I'd say your best bet is to try to pick something that compliments what your team has already picked, and keep an eye on when they switch. Just remember to be flexible in situations like this. I may add more to this answer later if that is alright.
Solution 3:
In order:
1) Junkrat 2) Reinhardt 3) Lucio / Mercy
If your team has Junkrat, pick Reinhardt. If they have both of those, pick Lucio, maybe Mercy.
Junkrat does so much splash damage that unless they're really well spaced out (Which they probably won't be on Hanamura), you'll be able to hit pretty much all of them at once just with primary fire, which makes it a lot easier than having to rely on the special abilities or even Ults of other characters, which will have a cooldown, have a higher risk of missing and it'll be worse when they do.
If your team has a Junkrat, then unless they're super incompetent (Like running in and not dying continually), they'll have that covered and you should probably go with Reinhardt to shield, push the position and try to soak up as much damage as possible, giving your team the ability to actually attack and get something done. This is especially effective if you're being directly backed up by Lucio or Mercy.
If your team happens to have Junkrat AND Reinhardt and something's still lacking, I'd go with Lucio. With Lucio, you can use the speed to rapidly get everyone up to the position where they need to be and then switch to healing to give everyone, especially the Reinhardt, some much needed longevity versus the hail of turret fire. If your other teammates, especially the Junkrat, are particularly good at not dying, then it might also be worth picking Mercy to give the Reinhardt more active healing, with the potential to Res at a critical moment.
Assaulting Torbs and Bastions is never fun. I personally hate both of them as characters and think they have no business plaguing Overwatch with their mechanical shenanigans, but that's just my opinion and should probably be saved for another day. I hope your luck improves with Hanamura in the future.