ESUS is the Branch (Isaiah 4:2, 11:1, Jeremiah 23:5, 33:15, Zechariah 3:8 & 6:12). He is the Angel of Jehovah (Zechariah 3:1). He is the Servant of Jehovah; the King of Israel. He is the stone upon which (Zechariah was told) there would be 7 eyes and an unknown engraving (vs. 9). Zechariah was privileged to see a wonderful vision that not only included the Messiah, but also explained clearly the mission of the Messiah.
In Zechariah's vision, Joshua the high priest (Ezra 5:1-2) is a representation. In the same way that the typology varies in the story of Abraham, Isaac and the ram (Genesis 22:10 & 13), Joshua represents several different entities as well. We know that Joshua is the Hebrew form of the Greek name, Jesus. And, we know that Jesus became sin for His people (and for us too) so that in exchange, we can and do receive God's perfect righteousness. The Theology, Christology and Soteriology of Zechariah 3 is as bold and as sharp as in any New Testament gospel passage.
Notice the role of Satan in this vision also. He is the accuser of the elect (vs. 1). And, it appears that he had plenty of which to accuse Joshua. Joshua (representing Israel, and by extension, us) was unrighteous (vs. 3). Not only that, before God mercifully rescued him, he had been condemned in his guilt (vs. 2). But God's forgiveness is great. His grace is greater still. And, the justification that He lavishes on us is absolutely unfathomable (vs. 4-5). We are literally robed in Jesus' righteousness. He has taken our filthy rags from us and given us His own holy garments.