There appears to be no reason that an elector cannot vote for whomever he wishes.
The legislature can only appoint electors they do not become part of the legislature after appointment are and were intended to be complete Free Agents.
Madison dreaded legislative control of the electors as the excerpt you posted shows.
I believe you’re confused over Madison’s virulent objection to the President’s election by the FEDERAL Legislature (basically a parliamentary system with a weak executive).
it’s not helpful, or persuasive, to seek out only what supports one’s position. Perhaps that fault kept you from seeing Madison’s expression of his preference (though not unqualified LOL!) for a popular vote.
AS events played out the Founders left it to the States- as the Constitution says- to control the Electors.
(i don’t see a significance in “appoint”, it’s a reasonable argument though).
Wish Hamilton had participated more in the Convention.