Miang's will is a hotly debated subject. For example, did she actually save Fei because she was Karen? Some people offer up the theory it was still Miang. She saved Fei because he was an invaluable part of her Master, Deus', plan and she had a considerable investment in him.
I'd like to say "both interpretations are valid" but Perfect Works says this on page 167 (Miang's page, Karen's section) :
Because of Fei's power running out of control, in the instant before he would have been harmed, Karen returned to her true self and shielded Fei, losing her life. However, because the "coward" had hidden this truth away, Karen's true will was not known until Fei's personality was brought back together.
One thing to remember about Miang : she's apparently not able to sacrifice herself on her own... or so she said to Ramsus. Fei's power killed Karen but she willingly sacrificed her life. Miang should apparently not be able to do that.
But, whatever, PW seems to say KAREN was the one who sacrificed herself. Yet, it says somewhere else in the book that Miang's host is sealed away completely. So what happened here ? Either Karen broke free by will power/desire to protect her child (a VERY common theme in the game). Or Miang can let her host come to the surface if she wants to. But, as a "program", shouldn't Miang not be able to set her hosts free ? Or is it a sign of Miang having some sort of will on her own somewhere ?
Reading Karen's section, it also caught my interest that Miang summoned Grahf (like he didn't just happen to find the Wong's house *no, no pun intended*). So, she did want something to happen out of this "meeting". The question is... what ? Did she just wanted to give Fei to Grahf and things backfired (Id's existence) and Karen broke free ? Or maybe she wanted to be indirectly killed and let Karen take the wheel. Why would she need to die ? To continue with the Ramsus manipulation plan without him recognizing her, I guess. Does that mean her crual experiments on Fei were just meant to break his mind in order to slow down/complicate Grahf's plans and the Contact's awakening ?
I feel like I'm arguing with myself while talking about this game's plot sometimes lol. To be honest, the game is kind of convoluted and confusing when you try to understand every little thing. But well, this game's story is pretty big so...
As far as i know the exact nature of Miang's self-determination is never truly elaborated on. Was she capable of defying Deus like Cain did? She does appear to take some clear sadistic joy in various things for example. It's all very murky from what I've read.
It's not clear enough in the game but like I said, side materials/tidbits hint at her not being just a program. Actually, I found this in Perfect Works (I had kinda forgotten about it), on Miang's gallery page (226)... where it explains why they chose a perfume named Contradiction for her (yeah, I don't know why they did this with the perfumes but it's pretty nice as they didn't choose those randomly) :
Having near eternal life, it seems Miang yearns alone for something. This image is suited to Miang. The derivative words in English of her name means "contradiction", and there is a deep meaning behind this.
Contradiction can work as Miang being the other side of the Mother (Elhaym) but this quote seems to hint at something unique to Miang herself.
And like I said, there are also additional stuff that I read. The thing I'm talking about is actually from the Xenogears Comic Anthology book and wikipedia seems to say it is official merchandising (like the 4Koma Comic). You can read the translation here : http://guardian.leamonde.net/manga/anthology4.htm
As for Miang controlling Deus to collect the excess humans, I see no real reason for this. She never cared about Krelian's objectives or anyone else's beyond how they helped with Deus being revived.
To be sure, I need to ask you which moment you are talking about. This one ?
Citan : Deus began to absorb, one after the other, the mutated people, destined to be its parts...
While the non-mutated, would eventually, only become a threat to it. To exterminate us and our civilization...
It set into action.
And Elly/Miang said this in the chapter before it, in Merkava :
In actuality, there wasn't enough parts for Deus... But, Krelian compensated for what was lacking.
The reduction in the number of parts, was due to humans living through multiple generations...
But that deficiency in the human factor, was made up for by the nanomachines created by Krelian.
Not only that, but his nanomachines added additional functions.
Deus has thus evolved into the perfect weapon.
What tells you the mutated people weren't necessary exactly ?
They were parts for Deus waiting to be absorbed.
Krelian helped with nanomachines but that's it. It only helped, not entirely replaced the biological parts planned.
Miang was pleased with additional functions Krelian came up with and that Deus didn't have back in space, apparently.
To me, it's proof that Miang was in control. She approved of Krelian's contribution... even with additional stuff that weren't necessary to Deus' revival... just made it more badass. Basically, she let Krelian help for the revival and make Deus even better as a bonus. But he can't control Deus. She does (well... and Elly of course, when she moved Deus at the end). As Grahf says, she's "Deus' main body".