First, reference this old but useful set of strategies for dealing with any sentry nest. Some of the advice won't be applicable due to how difficult it is to reach, but it should help guide you in the correct path.
Ideally, you will be working together as a team to take down the sentry nest - which means spies taking the engie's teleporter to sap/backstab, spam from demomen, soldiers and heavies, snipers headshotting the engineers, scouts bonking to distract or force the engine to wrangle his sentry, your engineers wrangling their own sentries to attack the nest, and pyros airblasting rockets back for additional damage, while your team also keeps the enemy repelled. While medics provide support with ubers.
Getting every member of your team to commit to this is difficult enough when the entire rest of the enemy team is fighting you, to say nothing of trying to get it organized in a public server.
On a team that has coordination, you're going to want to devote at least half of your team to keeping the enemy offense distracted while you take care of their 'impenitrable' defense. Scouts and Pyros are better suited for distraction, and can definitely be spared while putting your attack together. While Snipers can attempt to headshot pretty much anyone they like, or if there's no enemy to headshot, aide the spam to destroy the sentry nest. The Heavy can also focus on the enemy team, since his minigun spread means his bullets mostly won't reach the sentry nest.
On a public server, barring some miracle, you'll mostly be on your own. The spy is best suited for taking care of this nest, but if the Engie is smart and destroys his teleporter once he's up there, there's no much a Spy can do to help.
Snipers should of course be sniping at the Engie, though if he's turtling his head might be guarded. You can try to snipe at some of his equipment, like his dispenser, to get him to switch his focus to make his head pop out.
Spam as a demo and a soldier is always helpful. The Lock-n-Load and Direct Hit are ideal if you can get a clear shot, but the regular grenade launcher or a splash-frinedly rocket launcher are better if you can't get a bead on him.
And of course a heavy can help, though the minigun spread is going to make hitting his equipment much harder, and might be better off trying to keep the enemy team at bay.
Overall though, the main thing you want to do is at least try to take it down - if you start trying to take the nest down, it'll encourage other teammates to try as well.