Every season of Star Trek: The Next Generation had at least one episode that should be considered a masterpiece.
Deep Space Nine episode in which Captain Benjamin Sisko drinks a lot drew inspiration from its writer doing the same.