I don't know.
How's this sound:
The margrave of Baden marries Hedvig Sofia of Sweden, dowager duchess of Holstein. And moves to Sweden. (AIUI this match wasunder consideration OTL BEFORE her Holsteiner marriage. If Hedvig refuses Ulrike's on the table, although wiki says she was considered by the duke of Gotha at the time). They have one or two kids, who are considered as heirs after their mother (and half-brother). Carl XII kicks without a kid. The duke of Holstein is removed for some reason (maybe he dies in infancy or he marries someone the Swedes don't like the prospect of as OTL) and Sweden ends up in PU with Baden.
The margrave's brother, Christoph's eldest son, gets married to Elisabeth of Baden-Baden as was planned OTL, but Liz's dad married again and the idea was scrapped They have a few kids (Christoph's sons all had issue OTL and Liz managed a single child in her 40, with Count Althann, so I don't think it's too unreasonable. Kids get raised as Catholic though - also part of the original agreement IIRC). The margrave/king marries Luise Ulrike of Prussia (the arrangement was made to marry her to the Swedish crown prince, whether Ulrike's son or not, so I don't see that changing). Fast forward to the start of the 19th century, the king of Sweden/Baden's only son dies leaving no heirs. Next heir to Baden is the (Catholic) descendants of Christoph's son (ICR his name right now, I think he was Karl) and Elisabeth. But the king remarried after the death of the queen of Sweden in a morganatic ceremony. He attempts to equalize the marriage in Baden but the Christopherssens are hving none of it (and they're backed by the emperor of Austria (who's married to their eldest daughter (Franz II considered a match with Amalie of Baden OTL, while her twin sister, the OTL queen of Bavaria, was originally slated for either the duc de Chartres or the duc d'Enghien). However, Sweden doesn't want a Catholic monarch so they agree to regard the morganatic marriage as equal. There's some grumbling about it. The eldest son of the left-handed marriage becomes king of Sweden and is married to a daughter of the Christopherssen branch in Baden (who's willing to convert).