I don't totally disagree with the sentiment but there are a few things to consider:
1. The GOP base would be the one less
likely to be dissuaded by a test. Democrats have far more low propensity voters. Additional barriers, such as having to vote in person versus via mail or drive through, needing to get some form of official ID, etc. all hurts Democratic turn out more than Republican. Trump likely squeaks by on narrow swing state margins if a new, major barrier to voting is implemented. As is, the mail in voting boosted turn out rates arguably cost him a second term, although they also surely boosted his vote total, which he is so proud of.
2. All the same problems hold for minority turn out.
3. A test that successfully weeded out Trumpism would have to actually be rigorous, something analogous to the FSOT with its wide range of questions on basic historical, legal, and economic issues. The test isn't super hard, yet it has a 1% pass rate. People not particularly interested in politics already self select out of voting, so any test that would uplift the quality of candidates would necissarily restrict suffrage, probably by more than half. Your median Trump voter his higher income and more likely to be educated, so education as a metric fails.
4. The plan is going to be accused of racism due to the history of poll tests being used to eliminate Black voters. Although, I don't know if this is particularly fair since those generally weren't actual tests anyone could pass, but Kafkaesque riddles designed for failure. You'd almost certainly end up with disproportionate exclusion of minorities with any test though, which is a real political issue.
IMO, a much better system would be to not let people vote for the chief executive. Professional city and county managers vastly out preform elected officials at the local and regional level. Professional managers already administer large US political units with millions of people living in them, mostly out West. You could avoid the problem of elections being popularity contests by having people elect a small panel (based on popular vote and region, maybe 6/5 seats) who in turn hire a president and have the power to fire them. Selection is then done by merit by a party small enough to actually deliberate. This keeps regular accountability via elections and removal, but introduces a buffer to populism.
Also, I wouldn't put it all on the GOP. If a liberal Trump could exist (far harder because everyone would try to cancel them to out flank them), I don't doubt many Democrats would love them.
I look forward to pitching my system when, following Rome and Byzantium, and Avignon and Rome, we have new systems inaugurated in Mara Lago and Washington. I will say, the "Mara Lagonian Empire" does have a cool ring to it. Rather than the legal titles of Caesar and Augustus from the Dominate, the rulers shall be proclaimed the formal titles of "Donald" and "Trump," but maybe it can be reformed from the inside after the death of the king.