Any compact must represent something. There are methods of allocating the electoral votes of a State that would never pass Constitutional muster. "All and only votes by persons of the Caucasoid race" is the most obvious. The choice of the sitting Governor is obviously despotic in nature. A vote by a state legislature gives powers to states that the Founders never thought appropriate (and that probably applies also to gerrymandering that gives one Party's nominees a built-in advantage). A coin flip would be unduly arbitrary.
Um, but that's actually exactly how many of the founders intended electors to be chosen, and it is indeed how most states chose electors early on in the country's history. The state legislature selected the electors.
In the first elections most states used a popular vote rather than direct selection.
Well, in the very first presidential election, you're correct that 6 out of 10 states cast their electoral votes based on the popular vote. But in the following election of 1792 only 6 out of 15 states used the popular vote while the majority of states had their electors chosen directly by the state legislature. Then over the next couple elections the balance tipped back and forth. Then of course more states gradually moved towards choosing electors based on the popular vote, though South Carolina held out until after the civil war.
Anyway, my point, which still stands, was just that the founders absolutely intended for states to have the option of casting their electoral votes based on a direct vote of the state legislature, and such was common practice for a rather long time. There's no real reason why such a practice would be ruled unconstitutional if some state decided to return to that practice today.