I can't say much for TOS as I've only seen a few episodes but having watched TNG and DS9 several times I can think of a few episodes worthy of intelligent sci-fi:
TNG: A Measure of a Man, Q Who, Who Watches the Watchers, Sins of the Father, Yesterday's Enterprise, Sarek, Family, Brothers, The...