Yeah, I think people mostly agree that it's possible to justify this. The disconnect comes in for me because it seemed like part of what made him turn was seeing a fellow trooper die. Then a few scenes later he's slaughtering them by the bucket-load without flinching. I don't think it needed to be a huge drawn out thing, or a major character arc or plot line, but it did feel very sudden and that could've been mitigated if they'd at least shown he was a little bothered about it.
This wasn't something that bothered me at the time of viewing to be honest. However, since i've seen it mentioned I think my take is a little bit different.
He sees a fellow trooper die, but we never see him interact with any other trooper he is emotionally close with. The way I see it, in the moment he sees another trooper die, it's more of an existential moment, as if he is watching himself die. The purpose of the death, followed by thoughts of what it means to be alive, and then followed by the final actions of the FO in the mass slaughter of people who cannot fight back. He knows first hand what it is like to be a trooper, and the process of indoctrination he clearly has some clue of what it is about. Which could be explained why he makes the decision to escape before being forced to go back to the re-evaluation meeting setup by phasma.
There is a possibility to some degree he could view fellow troopers as brainwashed puppets, after these chain of events. However, when they are approaching and killing people, who for the first time, have shown him some of the humanity he has learned about himself. He has no choice, what, you going to convince all the troopers to rebel in the midst of battle? no chance.