The castle is essentially safe, as it's the second-best known company mascot right behind Mickey himself.
But....let's not pretend that Pirates is an attraction that will exist as long as the Magic Kingdom does. Pirates are symbolic of an action-adventure genre that waxes and wanes in popularity as time goes on, and it wouldn't surprise me if in 20-30 years, pirates become the new cowboys and PotC winds up on the chopping block for something flashier and newer.
Maybe it will spring from the Moana boat ride that was initially drawn up in the Animal Kingdom concept art.
I mean....if the cavernous grotto fits...