In fact, you have no idea, and neither does anyone else, whether Jesus ever actually told Peter to put away his sword, and certainly you don't know what was going on inside his head as he was being arrested.

How about some epistemological modesty. You are simply speculating.

<<As for Jesus telling the apostles to go buy swords.>>

How do you know this was "an endorsement of the use of arms in self-defense"? You can't know and don't know.