Voluntary Slavery is allowed in Islam. As evident from the following incident regarding Zaid-ibn-Harith.
"Zayd’s father and uncle set out for Mecca. They found
Muhammad (pbuh) at the Kaaba and promised him any ransom if he would return
Zayd to them. Muhammad replied that Zayd should be allowed to choose, if he wishes to return to his family and that Muhammad (pbuh)
would release him without any ransom.
They asked Zayd, who recognised his father and uncle, but told
them that he did not want to leave Muhammad, “for I have seen
something in this man, and I am not the kind of person who would ever
choose anyone in preference to him.”
Source: "Landau-Tasseron/Tabari pp. 8-9"
This incident is sufficient evidence to prove that despite being offered freedom, Zayd voluntarily accepted to remain in slavery of the Prophet (pbuh) without thinking about or knowing any outcome. The prophet (pbuh) even tried to change his status from that of a slave to an adopted son but that decision was over-turned by Quran, banning the practice of the kind of adoption at the time altogether.
When it comes to a woman, its better that she proposes a marriage rather than accepting volunteer slavery of a man. Because being married to a man she has the advantage to seek divorce whenever she deems it necessary. The only difference between the rights of a wife and that of a female slave is that the female slave cannot invoke Faskh (A kind of divorce initiated by the female without the consent of her male husband). Except this distinction, each and every other right of a woman remains the same for both a wife and that of a female slave.
Therefore, in extreme circumstances where a man is already married to four wives and there is a fifth female who wants to indulge in sexual relations or simply wants to stay closer to a man, her only option would be to become his slave.
Remember, slavery had not been abolished by Islam but rather discouraged. Its only the man-made governments of today who have abolished slavery. In Islam it is still allowed and Islam cannot be changed.
Lastly, war is not the only way to obtain a slave. A slave could be bought or be given as a gift too. Zaid-bin-Harith and Maria-al-Qubtia were both slaves of the prophet pbuh, and both were not obtained in war but rather gifted by others.