Your not translating vain correctly, from Matthew 6:7 the word vain is the Greek battologeo which means to stammer or repeat the same thing over and over again it as noting to do with vanity or the attention seeking he addressed in 6:5.
So... What about the angels praying repetitiously? Revelation 4:8: “...and they rest not day and night, saying, Holy, holy, holy, Lord God Almighty, which was, and is, and is to come.”
And, the liturgy of the synagogue was (and is) filled with repetition and formalized prayer. Christ said “use not vain repetitions, as the heathens do”. Were the Jews heathens? They prayed (and still pray) the sh’ma twice a day and, in their liturgy, the Shemoneh Esrei, the Kaddish, the morning blessings, the Aleinu, etc. Check out a Jewish siddur (missal) sometime; does it look more typically Protestant or Catholic?