Consequences of submitting a job application close to the deadline
I would say this depends on the department and their hiring practices, but in my department (math at a public US research university) applying early can definitely give you a leg up. In math in the US, there is a centralized application system (mathjobs.org) that most places use, and in my department all faculty get access to start looking at applications well before the deadline. Many of us do start looking at applications early, partly out of interest, and partly so we can take our time.
The advantage of applying early is that faculty may start talking about some candidates before any search committee meetings and people have the chance to get excited about your file early, which would give you some early momentum to help you stand out when we officially have meetings and rank candidates.
That being said, in other departments, faculty might not look at applications at all before the deadline, in which case there is no real affect. I do not know how common our approach is, but at least a few of my colleagues agree with me that it is better to apply early. I have also heard of departments that have somewhat misleading deadlines (they start officially reviewing files before the deadline, which might be in fine-print in the ad), so my advice is to try to prepare you application a bit early, and then submit application when your portion (i.e., excluding the references) is ready.
Incidentally, in mathjobs, the candidates submission date is readily visible, though it is not something that we focus on or analyze. (Though often we'll sort by submission date to see what files came in since last we looked.)
Extremely unlikely.
More organized institutions, and especially those with a culture of "procedural fairness", may enforce the stated deadline and resist considering applications that arrive after it. Certainly those that arrive significantly late, and possibly literally to the second.
At others, the effective deadline is when the person in charge gets around to preparing the file for the hiring committee, which may happen at any time after the stated deadline but may well be a few days later. You cannot count on that, of course.
Prompted by your question, I've checked and on the hiring files I most recently reviewed: the timestamp of application is visible, buried among other technical info none of us on the committee are paying any attention to.
A much bigger challenge for hiring committees are late letters of reference. Recognizing the unfortunate tendency towards elastic/fake deadlines and just-in-time response in academia, there is not only leniency towards late letters (when sent directly by the letter writer) but a painfully time-consuming amount of increasingly strident outreach by the committee itself to writers who are being slow. We try hard to not let it color our evaluation of the candidates, but it does: in an era (in some fields) of increasingly glowing letters becoming standard, akin to grade inflation, I have seen committees discount letters that took a lot of prodding after the deadline to come in versus those which arrived on time without prompting, indicating a higher level of priority for the writer.
The only applications that tend to be affected by time are those that arrive after the stated closing time.
I have never heard of or seen any system of application sorting involving those who submitted first or last past the post. However, my experience is limited, perhaps it does exist somewhere...