My conclusion (more of a strong inclination, I've learned how to be more considerate of other interpretations) is as follows:
- Like all other angels, the captain can act as a messenger of Yahweh. When he and other angels function in this way, they can speak as God, act as God, receive homage as God, etc., because they would have God’s authority, while remaining distinct.
- Unlike all other angels, the captain is always acting as a messenger of Yahweh (Exodus 23:20-22); he is always speaking as God, acting as God, receiving homage as God, etc., while being distinct from God, similar to how Joseph governed with the authority of pharaoh while pharaoh was a distinct and living person.
This phrase, "with a drawn sword in his hand" (Josh 5:13) rarely occurs:
In Numbers 22, the angel of Yahweh (whether he is Yahweh is also debated) is described twice "with his drawn sword in his hand" (Num 22:23, 31). Like Joshua, Balaam bows to the ground upon identifying the mystery man. In 1 Chronicles 21 (cross-reference 2 Samuel 24), when David and Israel are punished with a plague, David sees "the angel of the Lord standing between heaven and earth, with a drawn sword in his hand directed against Jerusalem" (1 Chr 21:16). Like Balaam and Joshua, David and the elders of Israel bow to the ground when they see the angel. More like Balaam, they do so to prevent further punishment.
With this evidence, I think we may be able to conclude the captain of Yahweh’s army is also the angel of Yahweh who appears to Balaam, David, and many others. Yahweh himself says about this specific angel, "my name is in him" (Exodus 23:21) and "the Lord, the God of the Hebrews, manifested Himself" (Exodus 3:18).
I think the captain’s arrival was significant to Joshua because it was the fulfillment of God’s promise, that Israel would receive leadership from a particularly powerful angel, one who possesses the full authority and identity of Yahweh, to defeat the residents of Canaan (Exodus 23:23-24). When rescuing Israel from Egypt, the angel worked alone, not as a military leader (Exodus 14:19-20). But when the time came for the Israelites to begin their campaign in Canaan, the angel took his place as captain of Yahweh’s army to “drive out the Canaanites, the Amorites, the Hittites, the Perizzites, the Hivites, and the Jebusites”, as God promised (Exodus 33:2), so he appears to Joshua “with a drawn sword in his hand”.