We’ve all either seen it or been part of it, and those who haven’t will do soon.
Bastion in Sentry Mode sitting behind a Reinhardt or Orisa (or both, gods help you) shield with a Mercy pocketing it.
You go for the Tanks, Mercy just heals them while Bastion rips you up.
You go for the Bastion, you get the kill off after losing your whole team and Mercy just rezzes said Bastion.
You go for the Mercy, both the tanks and Bastion tear you a new hole to scream out of, and by that point you need it.
So, how exactly to break this setup?
Some people would say the answer is to fight cheese with cheese and go Bastion yourself. But fighting fire with fire only ends up with more fire. You fight fire with water, so you should fight cheese with a grater.
But what makes up this grater?
Well, shieldbusters and high-damage heroes are a good start. Junkrat and Pharah. If there’s enough flanking routes to get by without being spotted, Reaper can burst down the setup. For Support, Zenyatta and Ana are good picks because they can increase the damage any of the setup takes and/or shut down the Mercy’s healing, which also effects Bastion’s self heal. The only two good tanks of choice are Zarya and D.Va. D.Va can eat some of the bullets Bastions spews out while Zarya can barrier anybody who gets close to the comp and use the energy to fire endless particle grenades into the shields.
But probably the best choice would be Sombra. Her EMP forces Bastion out of Sentry Mode and deletes any shields he’s got. But it only takes effect for a few precious seconds, so if you use Sombra, your whole team has to be ready to capitalize.
Who else is good for breaking this set up though? Who else can be included in the cheese grater that breaks the Bastion setup?
Your comp suggestions are fine, but the most effective weapon against pirate ship is simply good coordination. By this I mean that the team launches their attack on the pirate ship at the same time, preferably from multiple angles and bursts through it, killing the Bastion.
Sombra can force Bastion into Recon with just her regular hack. No need for EMP as long as she can stealth behind the shield(s) 
I like to diving it with whole team and me on pharah.
Teamwork is needed of course.
Circle around with pharah in hiding then get a few cheecky hits and then the rest of your team also dives in. After that you can easily clean up.
Since because of the dive, all enemies are distracted, what makes pharah have a free shooting game.
If it’s a payload type map, I sometimes use Lucio, and found it works many times. depends on bastions aim skill. Jumping around the paylaod like crazy, Bastion trying to shoot me, can disrupt them a lot. If rein starts smacking, I pull back a bit, and go back in with full health. Can very rarely do this alone. Oh, another thing: initiate with booping the rein/(mercy) off the payload.
Doomfist can get inside shields and lay into them
You can also try to flank them as a roadhog. If you’re lucky enough, you can get their mercy first, go behind a corner, wait abit for you hook, and then hook bast out of sentry - and blast him with two shots
Many possibilities but it requiers a good team play.
That’s why Bastion is really strong at lower elo (players don’t have the same synergy there unfortunately)
-
Mei : Her wall can block bastion’s line of sights or, even under the bastion pop him over the shield where he’s an easy target (but not for a long time)
-
Phara can bump them while hard rocketting Bastion
-
Widow can snipe the mercy leaving them without healing
-
Orisa can try to halt the bastion out of any payload or out of the shield if its position is not perfect
-
Destroying shields may also be a key. Over DPS can be hard but Junk/Hanzo/Phara can do it (even another Bastion could help depending on the first one in position
-
Sombra can hack the Bastion leaving this team without their first DPS
This list in not exhaustive but, as you see, there are many ways to fight him.