One supermassive black hole merger in the same or nearby galaxy, a biggish black hole merger within 10,000 light years, a magnetar hiccup within 500 ly, or a workaday supernova 5 ly off might be enough to sterilize a whole solar system. There is no guessing how many times life has been wiped clean that way.
The sooner our descendants can get the hell out of the galaxy, the better.
We could have been in sterilization range of a magnetar dozens or hundreds of times since life evolved, so we're just lucky none erupted when we were. The core supermassive black hole blew somehow just 100Mya, fortunately pointed somewhere else.
The only safe-ish corner is very far from everything else, and off-axis from the central black hole. We are deep in the thick soup.
But I don't expect our distant descendants to be dependent on starlight. A nice Kuiper Belt and Oort Cloud are good to stay in for access to building material and fusion fuel, but the most valuable resource, otherwise, will be abundant free cold.
Planets, as such, and sunshine are for the extremest primitives. Nobody advanced would want to be closer to the sun than, say, Neptune.
There is a an obviously uninhabitable zone close to the core black hole, and uncountable similar zones elsewhere, but Sol could move into one of the latter at any time. And, distant events could wipe us out, anyplace else, with decreasing probability as the density of other stars in the immediate neighborhood decreases.
All we can say is that we have not entered any uninhabitable zones in the last billion years or so, i.e. five orbits, and not been blasted too badly from a distance, likewise. Milder events could wipe out everything but deep-sea microbes, which at this late date might not leave time to evolve intelligent life again.
Lots of galaxies have heavy star-forming going on in the rim, with increased risk of supernovas. I don't know if we know whether ours is among those. (I doubt we can tell. Such regions are identified by high UV flux, but UV is blocked by dust, which is plentiful.) But otherwise, farther from the core is generally safer.
Star formation zones are very far from the most deadly places in the galaxy, or even in our neighborhood.
Always remember that intergalactic travel is exponentially harder than interstellar travel and that is already brutally hard. We need only be among the first in our galaxy to explain the Fermi paradox.
Of course the energy requirements are insane and would require some kind of physicists nightmare propulsion system like antimatter rockets. Lose reactor containment and you are instantly converted into plasma and gamma rays. If you hit something the size of a dust particle it will destroy your spacecraft.
A bit hard.
Near light speed is a requirement for intergalactic travel because even solid state machines will not last long enough to make it without time dilation to shorten the trip.
Interstellar travel could theoretically be achieved with 1960s tech. Look up Project Orion. It could even be done with chemical rockets if you could hibernate, greatly extend life span, build a generational ship, or be an AI and just turn yourself off for the trip.
Yeah, this is why I don't think we'll ever achieve this and I very much doubt other species have or will either. I don't think the incentives are there to expend this kind of energy (and capital) trying to get to another galaxy - especially since it would a very, very long time before anyone would know if the project succeeded (if it would ever be known at all)- there's no success feedback for a project like that. Interstellar travel will be difficult enough and the feedback time there would likely be at least a couple generations (longer depending on where the travel is to).
And, this one spacecraft needs to be able to slow down, have the telescopes and equipment needed to identify exoplanets and decide they are suitable, have the means to travel all the way there, and have everything aboard to start a complete new viable colony on some unknown planet. It probably needs to bring all the energy for the first few millenna in batteries. That must mean a huge spacecraft, and there also needs to be some way to land it all on the planet, hopefully with all the pieces close to each other. Et cetera.
The engine that got all that close to light speed is just a tiny piece of the puzzle.
Imagine the "runway" you would need. How many lightyears would it take just to slow down? And that's before you even consider how some sort of reverse propulsion mechanism would even begin to turn on without tearing the ship apart in a microsecond.
Similarly, if the engines are operated at a constant acceleration, then the distance needed to decelerate is equal to the distance needed to accelerate.
Fuel(/reaction mass), on the other hand, us not equal. The fuel to be used to decelerate must also be accelerated first, meaning more fuel is used to accelerate than to decelerate.
So for, what, two million years or five, the front of your spaceship is blasted with near-lightspeed intergalactic-medium molecules, plus trillions of dust particles and an unknown number of rocks.
"Erosion" is not an adequate word, but we don't have any that is.