First I need to point out that if either the commander elf dies the resistance wouldn't (have to) be over. Even if she is the last of her bloodline (as I recall the country being a monarchy) it still wouldn't have to be over. It isn't unheard of for nobility to adopt, even from commoners. It also isn't unheard of for someone unrelated to take over the monarchy and continue the kingdom. AND it isn't unheard of for a resistance to simply change the government to something other than a monarchy.
The resistance ALSO wouldn't (have to) end if he dies. Yes it would absolutely irrefutably set back the resistance as he is basically providing any and all advantage that they have. But he didn't create the resistance, they existed before he appeared in their world. He simply proved the means for them to advance their plans by (potentially) decades or centuries. Even if he dies, so long as ANY of their people survive and are able to stay away from the humans for long enough, the resistance would survive.
Secondly, yes, they raped him. Not only did they rape him, they did the equivalent of drugging him and then raping him (I can't really argue which is worse, I don't have the right or experience [thank God]). At least if he was awake he could have been induced to give consent, even if reluctantly.
Yes, sure, his original slave status hasn't been revoked, even though he has been given the power and authority beyond that of a slave. This still doesn't make it not rape, and it still makes it not right.
Additionally, there is the point to be made that men in history would and have done the exact same thing, or worse, under similar circumstances. Again, doesn't make it right.
Finally, with regards to people arguing the logic of bringing him to the front lines... They are making it clear that they will protect him. While it's true that to lose him is to lose absolutely any and all advantage that they had in this war, it still is more logical to bring him. He is their supply. Without him being there they would have to sacrifice people to form an interceptable "supply line" that would very much leak the technology that allows for their weapons. While it's absolutely true that his method of production cannot be replicated by anyone else (I think they made a point that he had to be the one to plant and harvest the crops for it to work, and that others couldn't use the furnaces or workbenchs), the actual technology for the weapons and explosives he is producing could very easily be reverse engineered from samples. The crossbow irrefutably could, the rifle wouldn't be that difficult even with the technology differences given enough samples of it and its ammunition, the grenades he produces use gunpowder, and the "TNT" is directly modeled off of Minecraft - so, basically gunpowder wrapped in cloth or paper. It isn't like he is producing laser weaponry requiring electronics and computers, or, heaven forbid, nukes requiring refined uranium and/or plutonium.
Really, the safest thing for them to do is either dig a hole somewhere and disguise it to have him hide in it so he can resupply them, or build a floating platform high enough that they can't reach it with letters and hide on it so he can resupply them.