Yes, the possession does override the intellect devourer and the intellect devourer would most likely want to abandon ship at that point, but could technically choose to stay along for the ride for a while to keep from being exposed. When the target dies, both the ghost and the intellect devourer would be forced out.
In light of another answer challenging some of the basic assumptions listed in the OP, here are the reasons why an intellect devourer's host is a valid target for a ghost's Possession.
Possession only requires it's target to be a humanoid. It says nothing about being conscious or "having awareness to begin with. The other answer has questioned whether an intellect devourer's host still counts a creature, and further questioned that if it was in fact a creature, was it still a humanoid.
Okay, so what's a creature?
There is no technical definition of what constitutes a "creature" in the 5e books. Jeremy Crawford has tweeted that a creature is a "being" of one of the types listed in the Monster Manual introduction.
But wait, does it lose its creaturehood if its dead?
No. Let's look at the Resurrection spell.
You touch a dead creature that has been dead for no more than a
century, that didn't die of old age, and that isn't undead.
Right. So being dead does not stop a creature from being a creature otherwise there would be no such thing as a "dead creature". But this is all a moot point anyway because the host is explicitly NOT dead. According to the Body Thief description, the host body is still alive until the intellect devourer leaves or is driven out of the brain cavity of the host body. There is no "effectively dead" or "dead for all intents and purposes" here. The body, the creature (I covered that) is not dead.
But wait! Is it still a humanoid?
This is getting a little circular, but Jeremy Crawford tweeted the humanoid is a creature type and a creature is a humanoid if they are of that type.
A creature type is a statistic found in a creature's stat block. If only we had a stat block for an intellect devourer in a host.
In Waterdeep: Dragon Heist (p. 210), we have a stat block for
Meloon Wardragon, an NPC possessed by an intellect devourer. It lists him as "Medium Humanoid (human), neutral evil" and we see that he knows Deep Speech and has telepathy 60 ft.
Based on the text that follows his stat block, under the heading "Adjusted Game Statistics", we see that is he is restored to his old self, his alignment changes, and he loses the Deep Speech and the telepathy. It does not say that his creature type changes to humanoid. And it would, since other game effects clearly call those types of changes out.
Looking at this stat block, we can conclude that this NPC is a valid target for a Ghost's Possession attack because he has the humanoid creature type.