@hazel makes me think about the traveling salesman problem...
Dijkstras algorithm calculates about a bunch of paths at the same time, keeping score at each node. So you can't apply it for maximizing the trolley deaths, because the path you took zeros the utility going over that edge again. Could make a "parallel universe" but that defeats the point of the algorithm.
The traveling salesman apparently can only visit a city once, same combinatorial explosion, but with removing edges to cities.