In many ways, both Sophocles' Oedipus Rex and Plato's Apology create dramatic arcs in which their protagonists attempt to use reason for ethical ends, both to help their societies and to discover the truth. In both works, the protagonists nonetheless end with their very use of reason leading inexorably to their destruction.
Oedipus, in a quarrel with the seer Tireisias, boasts of his own use of reason rather than religious superstition to solve the problem of the Sphinx that had been plaguing Thebes:
But then I came, Oedipus, who knew nothing.
Yet I finished her off, using my wits
rather than relying on birds.
In a similar way, Socrates attempts to use his reason to reform Athens. Both see reason as the ultimate path to truth and knowledge, and both use their reason to question people about matters they wish to discover. Yet, in the end, this questioning leads to their destruction.
In the case of Oedipus, his pursuit of truth by means of reason leads to the discovery that he is the murderer of Laius and the source of the pollution of Thebes. In the case of Socrates, his very act of questioning brings about his trial for asebeia, or impiety, and his insistence on rational argument rather than swaying the judges' emotions contributes to his being condemned to death.
Both authors admire reason, but Sophocles is concerned that reason, when taken too far, can lead to intellectual arrogance rather than wisdom, as when it leads Oedipus to insult Tireisias. Plato's view of reason is less ambivalent. While Socrates' use of reason leads to his death, it also leads him to die peacefully, in the full understanding that fear of death, and acting immorally due to that fear, is worse than death itself. The Apology concludes with Socrates saying, as he departs to prison and his subsequent execution:
But now it is time to go away, I to die and you to live. Which of us goes to a better thing is unclear to everyone except to the god.