The problem here is that while Article II gives states the right to choose electors, it does not allow them to violate Article IV, Clause I:
“The United States shall guarantee to every State in this Union a Republican Form of Government,..”
This compact means that state electors would no longer represent their state, but the voters of the several states. That is clearly unconstitutional.
I believe you mean Article IV, Section 4.
That provision (the guarantee clause) ensures that each state be run as a representative democracy.
Since the state allows its people to elect the state legislators, this requirement is met. Those elected representatives are then allowed to choose electors as they see fit.
The Constitution requires that the states be run as representational democracies, and that the senate and house are elected by the people - but it does not have that requirement for the electoral college members.
“it does not allow them to violate Article IV, Clause I”
That clause is specifically a mandate for the federal government, not the states, so it is impossible for the states to violate it.