Here the words "we" and "us" refer to John and all believers. The words "him" and "his" could refer to God the Father or to Jesus. (See: [[rc://en/ta/man/translate/figs-inclusive]])
John was an elderly man and their leader. He used this expression to show his love for them. AT: "My dear children in Christ" or "You who are as dear to me as my own children" (See: [[rc://en/ta/man/translate/figs-metaphor]])
The word "advocate" here refers to Jesus. AT: "we have Jesus Christ, the one who is righteous, who speaks to the Father and asks him to forgive us" (See: [[rc://en/ta/man/translate/figs-explicit]])