I disagree with he, if he thought it was a good idea? I don't think so.
Analyze it as, "I disagree with he who thought it was a good idea." "Whoever" is the subject of its own clause; it is the clause that you disagree with.
the answer to that question is whoever