This is exactly the problem why the world sucks so hard.
The engineer, certainly knowledgeable in this field, made a measured public remark, which could have saved lives. He has done nothing wrong, because he didn't claim to speak on behalf of his employer, and has the right to speak his mind as a person. In public, and with a lot of reach.
The government official, however, applied unconstitutional pressure to get the engineer fired and threatened his employer to lose business. Humanly very low and damaging to future public rail infrastructure, if a capable company is not allowed to provide services anymore and therefore most likely to increase prices through diminished competition.
If anyone should lose their job over this matter, it clearly should be the UK rail minister.