Solution 1:

According to the following article the idea of using terminology typical of marriage relationship dates back to the ‘30s. But the terms work wife/husband are relatively recent and date to the late ‘80s.

Although the term “office wife” has been around since the 1930s, the modern definition, the one that places the “work spouses” in an equal partnership, has only been around for 30 years. “Work marriage,” “work wife” and “work husband” first appeared in a 1987 Atlantic article by David Owen in which he describes the close but platonic relationships that can exist between coworkers, even asserting that the relationship is in some ways better than an actual marriage.

In the article McBride (professor of communication studies at Creighton University) notes that the expression has changed over time and now refers to the dynamics of marriage on a more equal basis:

Owen’s article referenced a degree of subservience on the part of the woman in the relationship, but McBride said changes to these relationships over the years have mirrored changes in actual marriage dynamics.

“I think the term is relatively new because the workforce has changed in the last 20 to 30 years,” McBride said. “If we think back to the ‘Mad Men’ days, there was, all the time, speculation about the boss and his secretary and what was going on. The difference now is that the relationships are more on equal footing, and I think that reflects the way we think about marriage now, too.”

The term also expresses the closeness of a relationship that can’t fully be described by the lexicon that already exists.

(rewire.org)

Wikipedia defines the expression as mainly AmE:

Work spouse" is a phrase, mostly in American English. A work spouse may not just be a co-worker, but can also be someone in a similar field who the individual works closely with from a partnering company. A "work spouse" is also referred to as "workplace spouse", "work wife", or "office husband", "work husband", or "wusband".

Solution 2:

To expand on my comment and address some usage aspects from a UK perspective at least (I suggest reading user240918's answer first):

The history of the phrase has more than a hint of sexism and out-dated power-structures in it, even if more recent use appears to have evolved. Any use must be carefully informed, and there's plenty of room for misunderstanding when a metaphor based on a sexual relationship is used to refer to a platonic one.

It's clear that the origins of the concept (even if the phrase used may have been "office wife") come from the days when men had executive roles, and women secretarial roles, that were often expected to include caregiving even if the possibility of anything more intimate was denied. Even as things have moved on, interdependence is a defining feature of the work wife/husband/spouse concept, implying a balance that's absent if one person see a friendship in that light and the other doesn't.

For a detailed discussion of the concept, Work Wives, Laura A. Rosenbury, University of Florida is worth reading. The article goes into the history of gender in the workplace, and evolving roles in marriage, and has plenty of references covering the evolving use, even if you don't get beyond the introduction. A sample quote may give a flavour:

Depending on the portrayal, a work wife is a secretary in a subordinate role, a flirtatious equal, a trusted confidante, a source of other forms of emotional support in the workplace, or multiple combinations thereof. Such portrayals also exist alongside portrayals of work spouses and work husbands that are similarly diverse.