If there's one good way to avoid a curse, it's by technicality.
Mythology and fiction have shown us over and over that defying prophecies or curses is always best done by using some sort of loophole. So if your players come up with something like this, it's actually okay to let them get away with it.
In fact, you don't even need to have planned ahead any way for them to escape their fates. Just throw a seemingly inescapable curse at them and watch them probe it for technicalities and loopholes. Then just pick the one you think is the cleverest and claim that was the correct answer all along.
Commentary by Keybounce (who has not seen the movie)
[Keybounce's comments will appear here when received.]
Commentary by memnarch (who has not seen the movie)
Aw, and here I'd thought Corey remembered the curse; a little too late to worry about it now though as understanding the location wasn't a requirement. The curse might have doomed Lor San, or maybe it's just something Lor and/or Luke made up, and Lor was just an idiot for walking out to get caught rather than trying to run and hide.
On the other hand, maybe it's actually sharing the chip the information's stored on that transfers this curse. Force ghosts Midi-chlorian clouds are a thing; why not Force "curses" too? Really old midi-chlorian clouds that are contagiously dangerous perhaps?
Transcript
Finn: So we go to Takodana, then.
Yanni: There really is a bar there?
Chewbacca: <sigh> Yes. There is.
Yanni: Right, let’s go!
BB-8: Oh no, I forgot! The map is cursed! Whoever passes on the location of Ahch-To is doomed. I don’t want to be doomed!
Rey: Well, you didn’t give us the location. We don’t know where it is.
BB-8: Right, yeah! There’s not enough info! So I could even hand over the chip and be safe.
BB-8: Yanni, do you want to look after it?
Yanni: Nah, I’ll pass on that. What are you trying to do, scare me? I don't believe in magic, a lot of superstitious hocus-pocus.
Finn: But you believe in the Force?
Yanni: That’s different. It’s not hocus-pocus, it’s mumbo-jumbo.