The meaning of the allusion in the sentence is:
A large project facing failure.
In this context, "getting off the Titanic" implies that the politicians' staff recognized that the campaign was doomed to fail, similar to how the Titanic was thought to be indestructible but ultimately sank.