Dave Wisniewski suggest the following for vv1-9 with the key point being that the priests would lead out the army.
A. 1 When thou goest out to battle against thine enemies, and seest horses, and chariots, and a people more than thou,
B. be not afraid of them:
C. for the LORD thy God is with thee,
D. which brought thee up out of the land of Egypt.
E. 2 And it shall be, when ye are come nigh unto the battle, that the priest shall approach and speak unto the people,
A’. 3 And shall say unto them, Hear, O Israel, ye approach this day unto battle against your enemies:
B’. let not your hearts faint, fear not, and do not tremble, neither be ye terrified because of them;
C’. 4 For the LORD your God is he that goeth with you,
D’. to fight for you against your enemies, to save you.
A. 5 And the officers shall speak unto the people, saying,
B. a. What man is there that hath built a new house, and hath not dedicated it? let him go and return to his house, lest he die in the battle, and another man dedicate it.
b. 6 And what man is he that hath planted a vineyard, and hath not yet eaten of it? let him also go and return unto his house, lest he die in the battle, and another man eat of it.
c. 7 And what man is there that hath betrothed a wife, and hath not taken her? let him go and return unto his house, lest he die in the battle, and another man take her.
A’. 8 And the officers shall speak further unto the people, and they shall say,
B’. What man is there that is fearful and fainthearted? let him go and return unto his house, lest his brethren’s heart faint as well as his heart.
A”. 9 And it shall be, when the officers have made an end of speaking unto the people, that they shall make captains of the armies to lead the people.
A. 10 When thou comest nigh unto a city to fight against it, then proclaim peace unto it.
B. 11 And it shall be, if it make thee answer of peace, and open unto thee, then it shall be, that all the people that is found therein shall be tributaries unto thee, and they shall serve thee.
B’. 12 And if it will make no peace with thee, but will make war against thee, then thou shalt besiege it: 13 And when the LORD thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword: 14 But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee.
A’. 15 Thus shalt thou do unto all the cities which are very far off from thee, which are not of the cities of these nations.
A. 16 But of the cities of these people, which the LORD thy God doth give thee for an inheritance, thou shalt save alive nothing that breatheth:
B. 17 But thou shalt utterly destroy them;
C. namely, the Hittites, and the Amorites, the Canaanites, and the Perizzites, the Hivites, and the Jebusites;
B’. as the LORD thy God hath commanded thee:
A’. 18 That they teach you not to do after all their abominations, which they have done unto their gods; so should ye sin against the LORD your God.
A. 19 When thou shalt besiege a city a long time, in making war against it to take it,
B. thou shalt not destroy the trees thereof by forcing an axe against them: for thou mayest eat of them, and thou shalt not cut them down
C. (for the tree of the field is man’s life)
B’. to employ them in the siege: 20 Only the trees which thou knowest that they be not trees for meat, thou shalt destroy and cut them down;
A’. and thou shalt build bulwarks against the city that maketh war with thee, until it be subdued.