The engineer in question was sacked for stating 'You’re talking about thousands of people squished into that space. It’s not just uncomfortable, it’s not just unpleasant, it’s unsafe.' in a media interview (see https://www.independent.co.uk/life-style/euston-trains-stati... looks like the unsafe part of that quote made the headline).
Here he was just amplifying already public information that the Office of Rail and Road had raised concerns and issued an improvement notice (which is reference in the article before he is quoted). I guess they hadn't actually declared it 'unsafe' though.
I think it is reasonable for employers to require employees don't go making negative comments in the media, though that is tempered by the public interest in raising the profile of safety concerns. Perhaps here the engineer felt no-one was taking the improvement notice seriously and needed more incentive to do so? Could also be he felt he wasn't trying to cause any upset at all and was simply stating what was already public known.
It does feel here that the minister that triggered the sacking was just being thin-skinned. He saw a newspaper headline that angered him and sought to take it out on someone. Perhaps some disciplinary action was warranted (maybe improvements were indeed underway and the engineer shouldn't go causing extra needless public alarm) but sacking him looks to be a big overreaction.