What would happen if they got 10,000 candidates? Would the ballot need to list all these names?
This would be extremely unlikely to happen in many states. States have ballot access laws, which as you might expect, restrict which candidates can have their name placed on the ballot. A good list of these laws applicable in the 2020 Presidential election can be found here, and you will notice that many require candidates to present a significant amount of signatures or to pay a certain amount of money in order to be listed on the ballot. Interestingly, as a response to the COVID-19 outbreak, Vermont has waived the signature requirement to appear on the ballot for the 2020 General Election; all that is required is a 'Consent of Candidate' form to be filed, so this would probably be the best bet for attempting to fill up the ballot.
If this did happen, states would be required by their own state law to place each candidate on the ballot. This would present significant problems - for example, in the 2019 Sri Lankan elections, the inclusion of just 35 candidates meant that a 65cm long ballot paper had to be used, which required special ballot boxes, and an increase in election costs of an estimated 6 million USD. This could be somewhat mitigated by electronic voting, but most states still require the use of paper ballots.
Would the ballot be ordered according to chances of being elected (following some official poll)?
Again, this depends on state law - some states, such as Alabama, order candidates based on the office they are contesting, and then by surname, while in Wisconsin, 'ballot order is determined by which political party's candidate received the most votes at the last General Election', with independent candidates drawing lots.
What would happen if two names sound confusingly similar, like "Donald J. Trump" "Donald L. Trump"?
Again, depends on state law. Georgia, for example, allows the Secretary of State to order the residence of the candidates to be printed next to their names, in order to differentiate them. In other states without such laws, this has been handled by finding some other way to differentiate the candidates. For example, in the 2018 midterms in Kansas, two candidates in the Republican primary had the same name - one being the Representative seeking reelection. On the ballot, the incumbent was labelled Rep. Ron Estes, while the challenger was labelled Ron M. Estes.