From Bernard F. Dick's Anatomy of Film.
"... Billy Wilder's films [...] center around 2 major themes: deception in the forms of disguise, fraud and masquerade; and the impact of 1 social or political order on another- capitalism and communism, rich and poor, youth and age.
The Major and the Minor (1942): A woman disguises herself as a 12-year-old in order to purchase a train ticket at half price.
Five Graves to Cairo (1943): A British officer impersonates a lame servant in a desert hotel.
Double Indemnity (1944): An insurance agent tricks a man into signing policy with a double-indemnity clause; the agent and the client's wife then conspire to kill her husband and collect on the policy; the agent briefly poses as her husband onboard a train.
The Lost Weekend (1945): An alcoholic is continually devising ways to conceal his bottle.
The Emperor Waltz (1948): An Australian countess meets an American phonograph salesman (a "conflicting social orders" film).
A Foreign Affair (1948): An army captain in postwar Berlin tries to conceal his relationship with a nightclub singer from a visiting congresswoman.
Sunset Boulevard (1950): An aging silent star deludes herself into thinking that she can make a comeback as Salome; her kept man conceals his status from his girlfriend.
Ace in the Hole/ The Big Carnival (1951): A reporter deceives the victim of a cave-in into believing he is the victim's friend.
Stalag 17 (1953): An informer infiltrates a POW camp.
Sabrina (1954): A rich young man courts a chauffeur's daughter (a "conflicting orders" film).
The Seven Year Itch (1955): A summer bachelor plays at being Don Juan.
The Spirit of St. Louis (1957): An atypical Wilder film, which depicts Lindberg's flight across the Atlantic.
Love in the Afternoon (1957): A May-December romance develops between an older man and a young woman whose father is a detective.
Witness for the Prosecution (1957): A woman tricks a noted barrister into thinking she is a cockney.
Some Like It Hot (1959): 2 musicians dress up as women; a millionaire (male) falls in love with 1 of the disguised men.
The Apartment (1960): A woman with a checkered past masquerades as a virgin.
One, Two, Three (1961): An American Coca-Cola executive and a radical East Berliner clash ideologically.
Irma la Douce (1963): To keep a prostitute from sharing her favors with others, her lover resorts to disguise.
Kiss Me, Stupid (1964): A single female bartender impersonates a married woman; a wife allows her songwriter-husband to think his song succeeded on its own merits although it became a hit because she spent the night with a famous pop singer.
The Fortune Cookie (1966): A TV cameraman is persuaded by his brother-in-law to sue for nonexistent injuries.
The Private Life of Sherlock Holmes (1970): Deception is implicit in any treatment of Holmes.
Avanti! (1972): A married man and the daughter of his late father's mistress arrange to have a yearly rendezvous in Italy, repeating the deception their parents (his father, her mother) had practiced until their death.
The Front Page (1974): An editor will do anything to get his star reporter back, even resort to a lie that also happens to be 1 of the most famous curtain lines in American theater: "The son of the bitch stole my watch".
Fedora (1979): An international movie star whose face has been disfigured passes her daughter off as herself.
Buddy Buddy (1981): To prevent himself from being unmasked, a hit man attempts to save a television censor from suicide.
Variety is achieved more through genre than through theme. Wilder's theme of deception and disguise manifests itself in farce (The Major and the Minor, Some Like It Hot, Irma la Douce), romantic comedy (Sabrina, Love in the Afternoon, Avanti!), political comedy (A Foreign Affair, One, Two, Three), social comedy (The Apartment, The Fortune Cookie), social realism (The Lost Weekend, Ace in the Hole), espionage and wartime melodrama (Five Graves to Cairo, Stalag 17), courtroom melodrama (Witness for the Prosecution), gothic melodrama (Sunset Boulevard), period pieces (The Emperor Waltz, The Private Life of Sherlock Holmes), and film noir (Double Indemnity)..."
"... the deception/ disguise theme recurs as various motifs in Wilder's movies. He uses adultery in Double Indemnity, The Seven Year Itch, Love in the Afternoon, The Apartment, Kiss Me, Stupid and Avanti! Insurance fraud is a motif in Double Indemnity and The Fortune Cookie. Women physically alter their appearance in The Major and the Minor, Witness for the Prosecution and Fedora. Men physically alter their appearance in Some Like It Hot and Irma la Douce. A woman deceives the man she loves in The Major and the Minor, The Apartment, Kiss Me, Stupid and The Private Life of Sherlock Holmes. A man deceives the woman he loves in The Seven Year Itch, Some Like It Hot and Irma la Douce. Men deceive each other in Five Graves to Cairo, Double Indemnity, The Lost Weekend, Ace in the Hole/ The Big Carnival, The Fortune Cookie, and Buddy Buddy.
In the films that use the conflicting social orders theme one can find similar motifs. Distinctions of class are demonstrated by the countess and the commoner in The Emperor Waltz, and by the commoner (female) and the privileged (male) in Sabrina. Distinctions of age appear between a young woman and an order man in Sabrina, Love in the Afternoon, The Apartment and Avanti! and between a young man and an older woman in A Foreign Affair and Sunset Boulevard. Distinctions based on war take the form of allies and enemies in Five Graves to Cairo and Stalag 17 and victor and vanquished in A Foreign Affair. Distinctions of ideology can be seen in the theme of capitalism versus communism in One, Two, Three and freedom versus fascism in A Foreign Affair."
I don't remember that bit in The Apartment.
Should note that Bernard F. Dick forgot that One, Two, Three was both a conflicting orders film and a deception film. MacNamara tricks Otto, then tricks the Soviet bureaucrats, and finally deceives his own boss; in the film there's a man disguising as a woman, and later Otto pretends to be an aristocrat's adopted son. There's also adultery in One, Two, Three.