The description of the Body Thief Action leaves some room for interpretation.
The description of the action leaves some possible ways to decide in a way or another: at the end, it is a DM call.
Target
The target must be
[...] an incapacitated humanoid within 5 feet of it that isn’t protected by protection from evil and good.
Is a creature with an Intellect Devourer (ID) (inside the skull) a suitable target, once it is incapacitated, within 5 feet and without the protection of the mentioned spell? Yes, since it is an humanoid (emphasis mine):
The intellect devourer retains its Intelligence, Wisdom, and Charisma scores, as well as its understanding of Deep Speech, its telepathy, and its traits. It otherwise adopts the target’s statistics.
The target's statistics encompass also the type: hence, the Mind Thief action can be used against a creature with an ID inside.
Anyway, another problem emerges: can ID in the humanoid "form" be targeted another Devourer's Mind Thief ? Indeed, the description of Mind thief says:
While inside a creature, the intellect devourer has total cover against attacks and other effects originating outside its host.
Here there are two possible interpretation:
- The target of Mind Thief is the ID inside the skull: since it has total cover, it cannot be targeted by any effect.
- The target of Mind Thief is the (host) body.
The actual target of Mind Thief is the creature, not the brain or the skull's interiors of the creature: but an ID-controlled creature is an ID which has total cover from effects per description.
The DM has to make a call in this case.
Is there a brain to devour?
The description says:
If it wins the contest, the intellect devourer magically consumes the target’s brain, teleports into the target’s skull, and takes control of the target’s body.
[...]
It knows everything the creature knew, including spells and languages.
Hence, the target's brain is no more and the ID takes its place, functioning as the brain but without being a brain.
Again, there is a little bit of room for interpretation: a DM could rule that an ID can challenge the ID inside a creature, considering the latter as an actual brain, for taking control of the body1.
Lore
Recalling that the description is part of the monster statistics, one can read:
Deadly Puppet Masters. An intellect devourer consumes a creature’s mind and memories, then turns the host body into a puppet under its control. An intellect devourer typically uses its puppet host to lure others into the domain of the mind flayers to be enthralled or consumed.
Hence, typically an ID serves its Illithid masters and uses its Mind Thief to convince other victims into Mind Flayers hands/tentacles: two IDs have little motivation to battle for one body.
Of course, the key is the word "typically": there may be some outliers in the ID population that may act in different ways.
1 I like to think to this case as hermit crabs fighting for a shell...