1) Nothing but emergencies belongs in an emergency room. Until you fix that, you cannot solve the other aspects. You must start by triaging non-emergencies to other service areas. Convenient care at a hospital, community clinics, community paramedics, and general practitioners can all tap off some of the pressure; Canada even recruited pharmacists. Emergency means "something that will cripple or kill today" -- health issues for which time is of the essence. If you just need a few stitches, you shouldn't be in an emergency room but in some other sort of clinic, whose personnel can reroute to the emergency room if something gets worse than it seemed at first. This would require a major overhaul of the American medical system, so people will not do it, and patients will continue to die of totally preventable causes. To be blunt, it's a vulgar form of human sacrifice; America chooses that some people die to avoid those changes.
2) You need some standard surge capacity. On an ordinary day, the facility should be running at 90-95% of capacity. That extra is not wasted space, it is fault tolerance. You need it for things like flu season (which happens every year at roughly the same time) and pileups (which happen at random intervals). That means nobody should ever have to wait for a hospital beds, because there should be enough empty beds to accommodate ER patients come into them.
3) You also need a surge plan for when your standard procedures can't cope. This will NOT work if your normal flow exceeds your capacity, which is what people are trying to do. But there will be times when a Mass Casualty Incident overwhelms even the best-equipped facility; that's when you need activation thresholds on your surge plan.
4) Hire enough personnel to cover the standard patient flow. Right now, medics are routinely overbooked, which means patients are routinely delayed or shortchanged of care -- which destroys trust, undermines quality of care, causes some people to avoid the ER, and kills some patients with real emergencies.
5) The personnel must be fresh enough to do demanding work, too, which means ER shifts of 4-6 hours and nobody works more than 8. Because people who have been working for 16 hours should not be making life-or-death decisions, and also because the tireder people get, the slower ... they ... go. To speed up flow, you need fresh alert workers.
6) Relating to #1 above, but requiring that other steps have been done first, teach people how to do triage. They must know what definitely is an emergency (e.g. a heart attack), what might be (a head injury), and what is not (a sprain) in order to select the most appropriate service type. No more of this nonsense of throwing everyone into an ambulance and thence the ER. In the attempt to avoid lawsuits, people are actually being killed because the real emergencies can't get past the trivial shit clogging the halls.