From the "More Than You Need to Know Department" of DU's Classic Films forum:
-------------
There seems to be a good deal of legal precedent, in film at least, for divorcing parents to separate their twins and take one each. This is the premise of, most famously, The Parent Trap (1961) and its 1998 remake, as well other films based on Erich Kästners book Das doppelte Lottchen (including the 1950 German film in which Kästner himself serves as narrator).
But this frightfully symmetrical approach to child custody in film predates Kästners book, going back at least to The Inn of the Blue Moon. This lost 1918 silent film features Doris Kenyon in the dual role of twin sisters assigned one each to their divorced parents. According to the film synopsis, the sisters are reunited as adults and help bring about the reunion of their parents.
https://screensplits.substack.com/p/twice-blessed-1945
---------------
The Inn of the Blue Moon:
When the marriage of Justus and Dorothy Druce fails, their daughter Dorothy goes with her mother to the Catskills, while her twin sister Justine settles in New York with Justus. Years later, Justine becomes engaged to Charlton Sloane, who offers to help Justus out of his financial difficulties by pawning the Druce family jewels. Justus' niece Adelaide, bitterly disappointed in her love for Charlton, convinces her uncle that the young man stole the jewels, prompting Justine to seek the services of Warde MacMahon, a young lawyer vacationing in the Catskills. When Warde's car overturns, Dorothy tends to his injuries in her childhood hideaway, "The Inn of the Blue Moon," and the two fall in love. Dorothy and Justine finally meet, and following several adventures involving their identities, Charlton's name is cleared, the daughters are married to their prospective suitors, and the long separated parents are reunited.
https://catalog.afi.com/Catalog/MovieDetails/14989
--------------
Metro-Goldwyn-Mayer (MGM) developed Twice Blessed as a starring vehicle for identical twins Lee and Lyn Wilde, following their debut screen appearances in the 1944 comedy Andy Hardy's Blonde Trouble. The project aimed to capitalize on the sisters' novelty as contract players and performers, positioning the film as an introduction to broader audiences.
The screenplay was penned by Ethel Hill, adapting her original story into a lighthearted narrative focused on family reconciliation through the twins' antics. Uncredited contributions to the story came from Mort Braus and Michel Kraike, who helped shape the core premise of separated twins switching lives to reunite their divorced parents. Producer Arthur L. Field supervised the production, emphasizing its tone as an upbeat family comedy amid MGM's slate of B-pictures.
https://grokipedia.com/page/Twice_Blessed_(film)
--------------
Hill would have 20 when The Inn of the Blue Moon was released in 1918. She could have seen the film which inspired her to change it a little for her story.
Louis Joseph Vance wrote the screenplay The Inn of the Blue Moon, by the way. Vance was an American novelist, screenwriter and film producer. He created the popular character Michael Lanyard, a criminal-turned-detective known as the Lone Wolf. He died in a fire that resulted from his falling asleep with a lighted cigarette in 1933.
https://en.wikipedia.org/wiki/Louis_Joseph_Vance
---------------
But hey, The Inn of the Blue Moon could have been based on a long-forgotten play. So ... who knows?