Save editing to reset a companion?

I made the mistake of finishing up the Repentant Devils quest by dropping him off in the Blue Kingdom, apparently this means he’s unavailable to all future captains.

Anyone know what values would need to be changed in a save file if I want to reset him? I really want him on my train but I also really don’t want to start a new legacy as I already have two heirlooms on this one.

Any help would be appreciated.