The weight of each literary device resides in, though are not limited to, a specific part of the plot structure:  the majority of the allegory begins the story in the exposition; the dream-vision or apparitions occur through the complication to the climax.
As Leo Lavy points out, the story starts out as an allegory, “creating the expectation that the characters will consistently exhibit the abstractions they symbolize.”  (Lavy/p.376).  He specifies this statement with references, such as; the early generality of the characters, Young Goodman Brown and Faith, the vagary of surrounding Brown’s journey, and the use of basic symbols of Brown’s companion’s staff and Faith’s pink ribbons.  Lavy labels Brown as “Everyman”, and indeed, with the generality of his name it would seem this was Hawthorne’s intention.