Either one makes sense on its own, but, though very similar, they are not exactly the same.
When you draw an analogy you are doing more than just making a
comparison. An analogy is more detailed. You have the
phenomenon to be explained with parts A, B, C, D, E. The
analogous phenomenon has parts a, b, c, d, e. You show how the
relationships among a, b, c, d, e are present in what you are trying to
explain -- in the form of the relationships between A, B, C, D,
E. I would call an analogy an extended, complex comparison.
Analogies often occur between very dissimilar systems of
relationships. On the other hand, comparisons are usually made in
a simpler way between two individual things that are generally in the
same category of things. Essays and sandwiches are very
dissimilar, to my mind, so I believe that the better word is
analogy in your example.
CJ