The real question here is does the impact with the fly slow the train by a tiny tiny amount?
This, and other questions like it come up a lot and often the given answer is yes but it's so small you can't measure it.
I think of this as the theoreticians fallicy ( but then I come from the experimentalist tradition so I would say that wouldn't I? )
The thing is you see theoreticians deal with idealised objects a "perfect" gas, a frictionless surface, bodies that operate at 100% efficiency.
This allows them to reach conclusions without having to worry about all the horrible nasty details that mess things up in real life.
Now that's fine and dandy as long as you estimate what these variables are and determine that they are small enough that you can reasonably ignore them because what you are measuring is much larger than that.
However people then come along who are less rigorous or who ae deliberately michievous and ask questions like the fly and the train.
Now the force acting on the train is so small that effects like variation of friction on the track, the efficiency of the engine under different conditions, even gusts of wind are suddenly way way larger that the effect that we want to consider.
Now no longer is it a case that we can neglect these other issues but they become so large that we are forced to neglect the very thing we are interested in (the braking effect if the fly)
So no the fly does not brake the train at all because other variations drown out the effect