The poem is called "The Chimney Sweeper," but it's really about a whole bunch of chimney sweepers.
There's the speaker, who is little Tom's friend and fellow sweeper. Then there's Tom, who has a really cool dream. In addition to Tom and the speaker, there is also Dick, Joe, Ned, and Jack, and thousands of others, who appear in Tom's dream in coffins but are eventually released by an angel.
Which one is the chimney sweeper mentioned in the title? There's really no way to answer that question, except to say that they all are. When all these young kids are treated so poorly, it's oddly fitting that they're lumped into one figure in the title. That's kind of how the world sees them—not as individuals, but as a work force.