This is what is said by the person who is staying behind, spoken to the person who is leaving, based on what I read elsewhere.
And as for what the departing person says to the person who is remaining/staying, that seems to be "selamat tinggal."
So, what about two people who've met somewhere, and who are BOTH departing? Would it be the case that both people could say "selamat jalan" to each other i.e. the phase doesn't really mean that the speaker is staying behind, but is commenting on what the other person is doing (i.e. leaving)?
Indeed that is correct as people then "go on a journey". It also means have a nice trip/journey. And it can be used to say "good by" for someone who is going on a trip/journey. It all depends on the context in Indonesian language. Have a good journey was my answer and that is considered wrong.
That is indeed the meaning for goodbye but that you say to the people who stay behind. So if you visit someone in her/his house and you go away . When you meet someone in the street or in a shop and you have spoken with him/her for a few minutes or so, then you can use selamat jalan and no selamat tinggal.