How far do you take this? For example, suppose you hear someone down the street yell, "My baby!", look up, and see a man shove a woman to the ground, take a baby from a stroller, get into a car with the baby, and drive quickly up the street, leaving behind the woman screaming "He took my baby! Help!". They pass you, and a block farther up turn left onto a freeway on ramp. 30 seconds later a police officer drives by,…
I think maybe a more nuanced rephrasing of "never talk to the police" is "talking to the police will only make you more likely, not less likely, to be convicted of a crime". If your values system is to minimize your chance of being convicted of a crime above all other things, then you'd say "I will not answer without a lawyer" in this situation. But if you're a compassionate human being and want to help others, even…
a) Odds of getting into that situation are a million to one, against.
b) Odds of your information helping to find said baby are a million to one, against (and even that is very optimistic I would say)
c) Odds of a police officer asking you that question because they want to have someone to blame for the crime are low, but significantly higher than 1/1e12
So I think that both on moral grounds, and on legal grounds, you should say something evasive first, and if the officer doesn't go away at that point you definitely should say the "any question you can send to my lawyer, and we will do our best to answer as soon as possible" line.
And, by the way, your lawyer will be angry if you do anything else.
More generally I would encourage you to think about the role of the police in a society. Not in the "the state is right and absolutely moral" way you seem to be stuck in. A state is fundamentally unjust. No matter how democratic, no matter how well it's going economically. I have worked as a consultant at a ton of "high" state organisations and I guarantee you, a month at any of them is enough to cure anyone of the notions you have.
At best, states are a necessary evil. They make some necessary things happen that would otherwise not happen. The police are their enforcers. Like any other power structure, they give ego-satisfying perks and social status to their enforcers, and so you can imagine the kind of person and motivation that a police officer generally is. And if there's one thing that can be absolutely guaranteed, it's that there is no just way to use violence to resolve situations (but a few good looks at the law will quickly absolve you of the notion that they're just, or even intended to be just). The state is not your friend. And especially the police is not your friend.
And I realize this point is contentious, but have you ever thought about how arrogant it is to assume there is a single "just" system at all ? There's many models of morality, from natural morality, to utilitarianism, to the various religions, to ... Important to remember is that they're all different, conflicting and self-contradictory.