This would not be acceptable in any other form of transport on safety grounds, never mind comfort, I am at a loss to understand how it is tolerated on the railways.
While I have sympathy for your concerns, one has to recognise that rail operates in a very different framework to road, sea and air travel and the hazards and risks are different both in kind and incidence.
Road transport is not constrained to a pre-defined path and, as is well known, impacts can happen both between vehicles and with the surroundings. These incidents occur with sufficient frequency to make it sensible to ensure that the users are both seated and strapped in - so the law requires this in both cars and coaches and everybody gets a seat. Stage buses are a special case in that in general, and certainly within towns where most passengers are carried, the speeds are not sufficiently high to be life-threateningly dangerous in the event of a sudden stop. It is acceptable to have standing passengers who will mainly be present at peak times when, due to road congestion, speeds will tend to be lower anyway.
Sea journeys tend to be longer and because of the way ships are built more space is allowed for each passenger. Accelerations in any axis tend to be low - except of course in severe storms but then one has sufficient warning for the passengers to sit down. Seat belts are not necessary and standing shoulder to shoulder cannot happen.
Aircraft are subject to constraints on weight, the position of the centre of gravity and the number of emergency exits so the passenger load has to be controlled. Aircraft are also subject to turbulence which means that large vertical accelerations can be experienced; seat belts are essential. The result is, as with car and coach travel, that every passenger has a seat.
Rail operates in a way which ensures that accelerations are low - the maximum is about 10%g longitudinally. Because of the end load requirements (200 tons-force with no permanent distortion of the body structure) coach bodies are strong enough to cope with the maximum number of passengers than can be accommodated in the space. As a result there are no design constraints on the maximum number of passengers - it is not necessary to limit the number of passengers to the number of seats. Under normal operation
The design case that you mention, fire, may of course occur, but one has to consider where fire is likely to happen as well as its frequency. For a fire to take hold it needs a fuel, a temperature high enough to ignite it and a supply of oxygen. Railway vehicles are constructed of fire-proof or fire-resistant materials; within the passenger space fuels are hard to come by (this is one of the reasons modern seats are so board-like) and an ignition source is difficult to find. Fire in emus and dmus is mostly likely to occur under the floor where hot engines, exhausts and high currents are to be found - if the in-built fire suppression does not smother it then there will be several minutes before any fire burns through the floor. In any event an underbody fire will be local to an engine or a fuel tank meaning the entire coach will not be engulfed at once giving passengers time to leave the train.
In the case of an accident, of course, things may develop differently - but once an accident has happened the results are very much in the lap of the gods. However fires in railway vehicles are very rare (I can think of three in the last twenty years: an
HST▸ losing a fuel tank near Maidenhead, the Ladbroke Grove accident and a recent fire in junction box of a Class 459/9 which burnt through the floor). Tens of thousands of people are carried by rail to and from work each day in London, New York, Paris, Hamburg, Berlin, Madrid and Rome and the number of fires is vanishingly small.
Overcrowding in trains might be unpleasant and it certainly damages the perception rail travel - but of itself it is not dangerous. Restricting the number of people in a railway coach because of the slight chance that an accident or a fire might occur is to condemn some of these people to death because of the greater chance of accidents on the roads.