You do NOT need a computer to do demand management! You just give the booking clerks a counter which they click for each passenger. As paul1609 says, you set the loading limit at a percentage of the seating capacity, to allow for people you haven't counted (those with passes, who joined at an intermediate station, and so on). Once you start getting to the loading limit, you check with the guard how many seats are actually left, and warn families that they may not be able to sit together..
While you don't know what specific passengers are going to do, experience should tell you that at this time of year, on that particular train, the loading limit needs to be set at a certain figure. If you have a coach totally pre-booked, then you simply lower the loading limit by that amount. It is not an exact science, and agreed that Galas pose their own problems. But in the case reported by the OP, on an ordinary service day, the railway concerned apparently got it wrong to the extent that people were having to stand in the guards van.
Once you have people standing, it not only means a poor experience for those standing, but also for those who have a seat who will feel crowded. won't be able to see out the opposite window, and may have trouble getting to the toilet or buffet. It is not good for the railway, as it is likely to lead to poor on-line reviews which these days can have a significant impact on future custom.