You can read the original version of Jesus’ parable in Luke 10:25-37.
The homeless man plays the part of the Samaritan. Jesus’ parable was an attack on the stereotypical social norms of the day. Jewish people hated Samaritans. A very ancient prayer (still found in the Jewish prayer book) says, “Blessed art thou, O Lord … who has not made me a Samaritan.” From the Jewish standpoint, Samaritans were the lowest of the low. In the parable, Jesus turns it around so that the one on the lowest social bar turns out to be the best, the most compassionate, the most righteous. The Samaritan’s righteousness isn’t based on who he is or where he comes from. His righteousness is based on the grace-filled action shown to another human.
It’s hard to convey the 2,000 year old social shock packed in this parable. I think a transgender prostitute or a member of the Taliban would make a more fitting character to play the part of the homeless man/Samaritan. It was that shocking to the people who heard Jesus tell it.