This is "The Lives of Christopher Chant", part of the Chrestomanci series by Diana Wynne Jones, first published in 1988. As you recall, Christopher can travel to other worlds in his dreams, these worlds have split off from his own when historical events could go in different ways. Normally people have alternate personas in these Related Worlds, but sometimes all the lives are concentrated in one person, in one world, making them a powerful nine-lived enchanter, as Christopher discovers he is.
His uncle recognises the usefulness of his dream travelling and gets him to help another, weaker, traveller (Tacroy) into the worlds, so they can acquire magical items from them. At first Christopher thinks this is fun and enjoys it, but later realises that they are smuggling illegal items such as "fishy-smelling parcels" from a world where he has previously played with mermaids. The work is dangerous too and he loses several lives this way, eg burnt by a dragon. When he loses a life in a dream world, he dies in the same way in the real world. He meets a young girl who is the personification of the Goddess Asheth. Christopher is killed by a spear through the chest in this world, wakes up in bed in his own world and is then killed by a curtain rod falling and piercing him through the chest. He is sent to boarding school, but his father takes him out and starts getting him trained so he can restore the family's fortune (which his father has squandered.) Soon after he is moved to Chrestomanci Castle to be trained as the next Chrestomanci.
He travels to other worlds in pursuit of another enchanter's lives, not his own. Gabriel de Witt is the nine-lived enchanter that he is being trained to inherit the title of Chrestomanci from. The big confrontation with tricksters that you recall is on Series Eleven, which is where his friend Tacroy comes from.