Both Sanders and Trump have a point in their criticism of the current process. It is flawed and archaic BUT they knew what it was before running for the presidential nomination of these two parties. Don’t like it, then run as an independent! No one forces anyone to run for elected office. One CHOOSES to do so. The basics of this convoluted system have been in place for decades. I remember in a book on RFK about the 1960 Democratic convention and something about a ”unit rule”. The JFK campaign lost a state delegation because of it but they did get the nomination on the first ballot. I agree the process is a mess but you do not try to change the rules of the game while playing the game.
It should be that all registered voters of a party on January 1 of a year are the only ones eligible to vote in a national primary for all of their party’s nomination races in June. The party nominations for the House of Representatives, Senate, and President all go up on a ballot in that month. It’s to be a preference ballot so you rank your choices for the candidates in order you want to see get the nomination for that race. The results for the House and Senate are given out at that time but the results for the presidential nomination are revealed only at the national convention for the party.
Each party sets out the order in which the results for the 56 states and territories is to be shown. Like from the state or territory that had the lowest percentage of the vote for the party’s candidate in the last presidential election to the one with the highest percentage. The results are shown one by one till all 56 are done. One screen shows the result from the current region and the other shows the national vote total. The top candidate is Leading if they have a minority of the vote, Elect if they have a majority, and Nominated if they remaining votes can not take them below a majority. If no candidate got nominated then the results from the second count of the ballots is done with the candidate with the least votes from the preceding ballot dropped. This is repeated until you are shown a nominated candidate.
This yields a straight forward get a majority of the vote of the party members in your district for the House, your state for the Senate, and nationally for the President in order to get your party’s nomination.