Weren't the successions in Denmark elective at this point? I seem to recall the monarchy only became hereditary with Frederik III. Though, what do I know, medieval history isn't really my strong suit, still less Scandinavian medieval history.
But, that aside. Let's look at this, taking that the throne is hereditary (can't remember how Margareta I got the succession right, I mean, the deck was stacked against her, as a woman in those days, which means it might have been hereditary). Margareta is the eldest (or at least first named of the daughters that I can find on Danish kings of the day). She had at least two older brothers, who married, Erik (d.1332), married to a daughter of the duke of Holstein and Valdermar IV Atterdag. The succession crises came up between Valdemar's kids OTL, his daughter, Margareta (I) (on behalf of her son, Olaf, King of Norway) versus his grandson, Albrecht of Mecklenburg, who already claimed Sweden's throne.
AFAIK, the Luxemburgs married Jan, Duke of Görlitz to Richeza of Sweden (Mecklenburg). This seems to imply (to me) that the Luxemburgs were already siding with the Swedes/Mecklenburger claimant against the Danes. I imagine if there is a Wittelsbach claimant in the mix, it will be far more intense from the Luxemburg side. The Wittelsbachs descending from Ludwig V's Danish marriage might likewise mount a claim against Queen Margareta, or at least if Olaf still dies, push to be recognized as her heirs over those half-Mecklenburger brats that became Erik and Katharina of Denmark, Sweden & Norway. This might result in out and out warfare, or merely a low simmering feud between the Mecklenburgs and the Wittelsbachs (similarly to how there was one between the Luxemburgs and the Wittelsbachs).
But this is assuming all runs as OTL, which it might not. If we're wondering what support Denmark might be able to give to an imperial election of a Wittelsbach in 1347/48, I'm not sure. Wasn't Valdemar IV sort of in the middle of a quasi-civil war? Or was that over by 1347? And if it was, how much power could Denmark project into the Empire as it then stood? The Luxemburgs already have two votes in the electoral college (was the Golden Bull a thing yet?) - Bohemia and Brandenburg. While the Wittelsbachs only have 1?, namely the Palatinate. But an interesting thing I discovered, was that Ludwig V's half-sister, from his dad's second marriage, was married to King Erik (XI) of Sweden (b.1339) and likewise had no issue. So, if the Ludwig V Danish match produces issue, would the Wittelsbachs still go looking for a Swedish match? Or were Sweden and Denmark not yet at daggers drawn like in later centuries?