This is an interesting topic. Let's go beyond that "buy a sword" verse and bring some patterns from other verses.
I see John the Baptist not telling soldiers to stop killing. I see Peter not telling Cornelius to stop killing. I see Paul even using a legion of soldiers to protect himself from the Jews, and also using a soldier analogy in the spiritual world.
I see Paul also saying that soldiers carry a sword to bring justice and we must submit to their authority.
I also see none of the Apostles or Christians, during their ministry after Pentecost, taking swords with them as they spread the Gospel. In the Old Testament, except from one instance where Samuel used a sword, the prophets didn't use to carry and use swords.
The two instances where you see the phrase "he who kills by the sword will be killed by the sword",
Matthew 26:52 and
Rev 13:10, are in the context of persecution. I think what the phrase really means is that when persecution comes against the saints, those that try to stop it with the sword will perish by the sword. When persecution comes, the principle I see is to flee, instead of resisting it by the sword.
All of this makes me think that the point is that if it is your job and authority in society to stop evil and bring justice by the sword, then you should use it rightfully: soldiers, officers, guards, etc.... But when you are ministering the Gospel, and bringing the word of God to the people, you should not be armed and suffer persecution if it comes.
Am I missing some passages of the Bible that go against these principles?
BTW, the verse about buying a sword has to be put in context:
[
Luk 22:36-37 NKJV] 36 Then He said to them, "But now, he who has a money bag, let him take [it], and likewise a knapsack; and he who has no sword, let him sell his garment and buy one. 37
"For I say to you that this which is written must still be accomplished in Me: 'And He was numbered with the transgressors.' For the things concerning Me have an end."
It is like if having swords in the group was to be used as an evidence against them as preparing a revolt against the authorities.