Assuming you lack the capacity to leave for good, you probably want to be in the system, but in a well-stocked tin can rather than a planet. You won’t be able to maneuver a planet but your tin can might be able to stick around. Afterwards you’ll need a star and whatever planets didn’t get eaten or flung out of the system.
You definitely don’t want to be on a planet that gets flung out of both systems. Even if you somehow had millions of years of fuel, your civilization would probably never be close to any other body in space again.
Hah, amusingly I failed to consider that. I wonder how fast a sun would have to move through to have a negligible (or at least not catastrophic) effect on orbits?
The Oort cloud around the Solar system ranges halfway to the next star. That far out the Sun is probably not the only relevant influence anymore. Even though stars would have to get really close to be able to mess up orbits of the inner Solar system, a large comet can absolutely wreck the biosphere if it hits us.
You definitely don’t want to be on a planet that gets flung out of both systems. Even if you somehow had millions of years of fuel, your civilization would probably never be close to any other body in space again.