The Church does not teach that women can only work out of grave necessity or injustice. And rather than focusing on real life examples of people and whether their situation is OK or not OK, I would rather present what I believe to be the Church teaching, generally.
It seems to me, though I am not a theologian, that the totality of Church teaching on this subject should be thought as follows: wives and mothers cannot neglect their duties as wives and mothers, but if these needs are met, they are permitted to work and society should structure itself so that this option is made available to women if this is freely chosen and not chosen by societal or economic pressures.
Why do I say this?
The past Magisterial documents from the Popes do make references to women staying at home/working near home, but about half of the time this seems to be qualified with a statement along the lines of “so that her duties as mother and wife are not neglected”.
Consider Casti Connubii (Pope Pius XI, 1930):
(We have already said that this is not an emancipation but a crime); social, inasmuch as the wife being freed from the cares of children and family, should, to the neglect of these, be able to follow her own bent and devote herself to business and even public affairs; finally economic, whereby the woman even without the knowledge and against the wish of her husband may be at liberty to conduct and administer her own affairs, giving her attention chiefly to these rather than to children, husband and family.
Also Quadragesimo Anno (Pope Pius XI, 1931):
Mothers, concentrating on household duties, should work primarily in the home or in its immediate vicinity. It is an intolerable abuse, and to be abolished at all cost, for mothers on account of the father’s low wage to be forced to engage in gainful occupations outside the home to the neglect of their proper cares and duties, especially the training of children. Every effort must therefore be made that fathers of families receive a wage large enough to meet ordinary family needs adequately.
And Divini Redemptoris (Pope Pius XI, 1937):
Communism is particularly characterized by the rejection of any link that binds woman to the family and the home, and her emancipation is proclaimed as a basic principle. She is withdrawn from the family and the care of her children, to be thrust instead into public life and collective production under the same conditions as man. The care of home and children then devolves upon the collectivity. Finally, the right of education is denied to parents, for it is conceived as the exclusive prerogative of the community, in whose name and by whose mandate alone parents may exercise this right.
One could read this as Pope Pius XI stating that the core principle is that wives and mothers cannot neglect their duties as wives and mothers, and that prudentially, this was best accomplished by women remaining in the home. But must this prudential decision must always be so? Well, that is for the Church to decide, and we start to see a new direction emerging as the Church takes on the issue of human dignity.