I think that the Trinity was known to the Apostles, and that it was passed on to succeeding generations of Christians. I agree, though, that the understanding and formulation of the mystery requires time. The doctrine was formulated very precisely in the early creeds, such as the Apostles Creed, the Athanasian Creed and the Nicene Creed.
In the 13th century, largely due to the work of St. Thomas Aquinas, the Catholic Church developed a more refined and philosophical understanding of certain key concepts in the doctrine, particularly the distinction between “person” and “substance.”
In one of your posts you mentioned that the word “person” originally meant a theatrical mask. That is true, but that was a nominal definition, and that is not how the Church today understands the word “person” as used in the Trinity. A person (according to the philosophical understanding developed by St. Thomas) is **a free and intelligent subject **, and a subject is any substance that acts. A stone is a substance, but is not a subject - because a stone does not act. A bird, however, is not merely a substance, but is also a subject - because a bird can fly or be the author of its own acts. However, a bird is not a person because it is not a free or intelligent subject. Human beings, angels and God alone are persons because they are free and intelligent subjects, capable of initiating their own acts, and - because they are intelligent - are also responsible for their acts. However, each human being and each angel is one distinct person. From revelation we learn that in God there are three distinct persons that constitute but one divine subject.
The three divine Persons are distinct as persons because they have distinct internal acts. For example, the Father is the one who, by knowing Himself, begets the Son and who sends the Son into the world. The Son (not the Father) is He who has been sent, who became human (Christ), and made satisfaction for our sins. As a divine Person the Son proceeds only from the Father because He is the Father’s knowledge of Himself. The fruit of knowledge is love. The Father loves the Son, and the Son loves the Father. The Holy Spirit is the love between the Father and the Son, and so He proceeds from both the Father and the Son. Like the Son, the Holy Spirit also shares the same divine nature, the same divine Subject, but He is a distinct Person because He has His own internal act. He proceeded from both the Father and the Son, and is also sent to be - not the Redeemer of the world, - but the Sanctifier of the just.
I hope this brief explanation helps.