Luke 2 has at least two potential structures that its stories are organized around, and neither are mutually exclusive. Both are supported and framed by the mentions of hearts, most notably Mary’s.
First, we have a conventional chiasm:
A - Mary treasures and ponders things in her heart (2:19) B - In the temple - Simeon (2:20-33) C - Rising and Falling - thoughts of hearts revealed (2:35) B'- In the temple - Jesus (2:41-50) A'- Mary treasures things in her heart (2:51)
The center is about the rising and falling of many in Israel, and of a sword that will pierce Mary’s soul. The secret thoughts of many hearts will be revealed.
All of this happens during Jesus’ ministry, and it is just exactly when the pondering inside of Mary’s heart would come to the forefront, the whole reason Mary is keeping these treasured moments. When what Mary stores up is revealed, so are the hearts of many others. See also Romans 2:16.
The second structure is a set of three parallel sequences:
A - Trip to the manger (2:16) B - Message given to Jesus' parents about the child (2:17-18) C - Mary's heart (2:19) A - Trip to the temple (2:22-27) B - Message given to Jesus' parents about the child (2:28-33) C - Thoughts of hearts revealed (2:34-35) A - Trip to the temple (2:41-47) B - Message given by Jesus' to his own parents (2:48-50) C - Mary's heart (2:51)
Some interesting comparisons come up. The manger (and the child) is in place of the temple. Jesus will be the one who makes clean and forgives sins, and so will end up being the true temple, so this makes perfect sense. We should be expecting it.
And then Jesus himself is in place of the messengers. Others have been speaking about him, but now he speaks for himself. The Word made flesh is not only the consummation of the Law (the temple being the prime symbol), but also the Prophets. God now speaks through his Son (Heb 1:1-2), and we should listen (Luke 9:35).
The replacement hinted at begins to take place in the very next chapter, with John the Baptist’s imprisonment and Jesus’ anointing.
There might also be structure in the progression of reactions to the various messages from heaven. People wonder about the message (2:18). Joseph and Mary are amazed about the message (2:33). Finally, Joseph and Mary are confused about the message (2:50).
This tends to follow the same trend as Jesus’ ministry. People are amazed…but then also get very confused.