It is traditional amongst commentators of recent centuries and the present day, to pooh-pooh the idea that the Good Samaritan was ever intended to be read allegorically.
(Under the allegorical interpretation, the wounded man is the needy sinner; the priest and Levite represent the inability of the law and sacrificial system to save; the good Samaritan is Christ. This can be fleshed out beyond this, with increasing doubtfulness the further we go, but those are the essential points).
I'm not convinced by the pooh-poohing. I think it's a valid reading, by which I mean that Jesus may have intended his hearers to hear it that way. (This in no way undermines the literal reading as a simple illustrative story and the points taught by Jesus through it).
The lawyer's question, "who is my neighbour?", we are told, was an attempt at self-justification. His answer, as a good Pharisee, would have been "my fellow Jews, or perhaps just those faithful to the law (my fellow Pharisees), are my neighbours".
We know that this was a hot point of controversy between Jesus and the Pharisees. Jesus fellowshipped with tax collectors and sinners - unclean people. Jesus made a deliberate point of doing so. He came and fraternised with them to rescue them. The Pharisees did not.
This was well known to everyone by the time we get to Luke 10. The question "who is my neighbour?", when asked by a lawyer to Jesus, has big undertones. "Jesus - you treat these dogs as your neighbours; you must be unclean like them! Why don't you justify what you're doing?" That's a question that's being asked, and is expecting an answer.
If I'm on the right track with that, then you have to then read Jesus' reply in that light. I outlined that answer in my previous post, as amounting to "go and sacrificially serve first, using acts of self-giving love to make people to be your neighbours - that's the way of my kingdom".
That being so, then it follows pretty much as night follows day, that Jesus was casting himself in the role of the Good Samaritan. (We remember too that his opponents insulted him at times by calling him a Samaritan - and he deliberately passed through Samaritan country at one time in John 4 in order to preach the kingdom to them). Jesus is the one who crosses the boundaries erected by religious self-righteousness in order to save the needy. That's not an illustrative analogy; it's part of what Jesus was telling the lawyer. Thus, the story is indeed meant to also be read allegorically.