The thing about Pharaoh is, it isn't very different to earlier adventures, such as White Plume Mountain. The only innovation is the dungeon has a better narrative, beyond "a mad dungeon master did it". Which means when the players do what they normally do - complete the dungeon - they are rewarded with a satisfying cutscene, rather than a pile of pretend money.
Well, and some magic items and a pile of pretend money.
To me the main innovation in Pharoah is the quality of the map. White Plume Mountain is overtly gamist in design, in that quite obviously everything exists for the purpose of a series of challenges of player and character ability. Pharoah is the same thing and made in the fiction for the same purpose, but it works much harder to justify its existence and make itself believable. It also I think excels earlier designs in giving a wide variety of encounters within the same dungeon framework.
It's when you start hooking these things together into a campaign that railroading becomes a problem.
The sequels are I think in general less well regarded, but that that's because Pharoah is so hard to run wrong. Even a novice GM can run Pharoah and have a great experience. The sequels on the other hand in addition to being less well designed with less satisfying story beats also leave a lot out that skill is going to have to put in.
The sequels, that became the Desert of Desolation campaign, depend on the players unleashing an evil efreet in a random encounter in the first adventure.
And this is an example. They don't really. Sure it would be really fortuitous for the story if the players themselves were responsible for unleashing the evil efreet, but they don't have to be. If the players don't do that, well the GM can always invent the NPCs who did and who are now inhabiting the same world with their own motivations as either foils or allies of the PCs or the Efreet or both as the plot twists. The problem is that the module doesn't tell you that and doesn't help you plot that version of the story. You have to be skilled enough to see that need immediately and know how to handle it.
What if the players didn't free the efreet? What if they didn't have that encounter at all?
And again, this isn't a huge problem, but the skilled GM wanting to try to steer the game uses a soft railroading technique like Shrodinger's Map to ensure the PC's do have the encounter. Players being players can be expected to behave pretty reliably after that, but even if they don't well that's still story you can work with.
What if they don't care? If the DM is determined to run the sequels they have to force the players to act in a certain way.
I mean if they really don't care and they have different motives you can always tempt them with motives that they do care about. But if they are truly bored and you don't have buy in, you just start dangling hooks until find something that they are willing to buy in and set the module aside now as a campaign element - the Evil Efreet Lord rules this part of the world and the people are suffering and in need of a savior. Move on to something else, and if the PC's want to come back to it later, fine. And if not, oh well. But I mean seriously, if you don't have buy in at all there is probably something big wrong with your DMing, because what more motivation do players need than loot and heroism. If they are really that bored that they are wanting to get out of the scenario, what the heck is the problem?