Chimney-sweeping was a dirty business, and those kids suffered a ton. Abuse, cancer, early death—you name it, they faced it. So it makes sense that a poem called "The Chimney Sweeper" would face death in some way. It does so in Tom's dream, in which the little guy sees his fellow sweepers in coffins. This might remind us that these kids face an early death, but it also shows us that in many ways, they're dead already; they've lost their childhood, their freedom, and their innocence. According to Blake, the chimney-sweeping life is no life at all.
The death these kids face is both literal and figurative. They'll likely die early because of their dangerous job, but they have already died in the sense that they've lost their childhood and innocence.
When the angel frees the boys from their coffins, it's meant to show that death is the only way out of this chimney-sweeping life.