You asked:

when was agoraphobia discovered

Sorry, I don't yet have an answer to that question.