There are quite a few laws in the US that give special legal privileges to some construction such as "the top two political parties" or similar. For example, specifying that a committee's membership be composed of 1/3 one of the top two parties, 1/3 the other of the top two parties, and 1/3 unaffiliated. Or 1/2 one of the top two parties and 1/2 the other one.
You're absolutely correct that this is completely unreasonable, but it's also common as dirt.
At best, it's a matter of judgement of what's desired socially.
Actually that's exactly how monopoly law works, checking dominance in a market.
It's also not different from the subtle laws (even in US) for determining religion or cult.
>Twitter might be popular today, next year it could be something else.
That's not a problem at all, as a law could e.g. cover all social media companies "above a certain user threshold".
>And how would you even define "social media" in a way that would pass Constitutional muster?
I don't really need to pass U.S Constitutional muster, as I'm speaking about E.U. That said, I'm pretty sure if US legislators wanted it, they could find a way. They have defined what's journalism, they could also define what's social media. Or they could extend the law to all media.