Your method could work, although I am not certain how accurate it will be.
IMHO astronomical techniques to measure angles are much more precise than astronomical techniques to measure apparent magnitude, calculate absolute magnitude, and calculate the distance from the difference. So the question is whether using Cepheid variables will ever become more precise than astrometric techniques measuring the angles to various astromonical objects.
I doubt that an expedition to the Andromeda galaxy that takes thousands of years with the crew in suspended animation will be the very first interstellar expedition using a newly invented faster than light drive.
For one thing, a method of suspended animation for humans will have to be invented, and it will have to be tested by successfully reviving people in suspended animation for periods of decades, centuries, or even millennia before being tried for a millennia long space expedition.
People will have to be revived with no ill effects after longer and longer and longer periods, so if the expedition to Andromeda is expected to require X thousand years in suspended animation, people should have already been revived after X thousand years in suspended animation. And it may have taken several times X thousand years for people to gradually build up to being in suspended animation for X thousand years.
Instead of the expedition to Andromeda being the very first faster than light expedition from Earth, it is much more likely that Earth humans will have explored parts of our galaxy with the faster than light drive for tens, hundreds, or thousands of years and have reached various stars that are tens, hundreds, thousands, and maybe even tens of thousands of light years from Earth by the time that they decide to send an expedition to the Andromeda Galaxy.
They might even have explored the entire Milky Way galaxy or even sent expeditions to various satellite galaxies of the Milky Way, like the Magellanic Clouds, for example, before deciding to send an expedition to the Andromeda Galaxy.
So Earth humans should be spread out across many light years and parsecs of space by the time an expedition to the Andromeda Galaxy is planned and sent.
One thing that Earth based astronomers are very good at and constantly improve at is measuring small angles accurately.
A degree of arc is 1/360 of a circle or 0.002777 of a circle, an arc minute is 1/60 of that or 0.0000462 of a circle, an arc second is 1/60 of that or 0.0000007 of a circle, a milliarcsecond is 0.001 arcsecond, a microarcsecond is 0.000001 arcsecond, and so on.
The angular size of the Moon as seen from Earth is 29.3 to 34.1 arcminutes, and the angular size of the Sun as seen from Earth is 31.6 to 32.7 arcminutes, depending on the orbital distances of the Moon from Earth and Earth from the Sun. The average resolving power of the unaided human eye is about one arcminute.
Because the Sun and other stars orbit around the center of the Galaxy with periods of about 250,000,000 years at the Sun's distance from the center, the directions between the sun and other stars change slowly, a change that change is called the proper motion of the stars. Proper motion was suspected but not proven until 1718, and then astronomers began searching for and measuring proper motion more and more accurately.
The distance from Earth to the Sun varies during Earth's elliptical orbit around the Sun, but is defined as an Astronomical Unit, or AU, of 149,597,870.7 kilometers. At any one moment, Earth is in one specific direction as seen from the Sun, and exactly half a year later Earth is in the exact opposite direction as seen from the Sun and about two Astronomical units from its previous position.
A unit called a parsec, first defined about 1913, is the distance at which one AU would appear to be cover a single arcsecond. A parsec is about 206,264.806 astromical units, or about 3.261 light years. If an astronomical object was exactly one parsec from the Sun, it would appear to move by two arcseconds when measured from Earth at two times half a year apart, and would be said to have a parallax of one arcsecond.
In the late 1830s astronomers tried measuring the parallaxes of various stars with large proper motions, that were probably close to Earth, and succeeded in measuring the parallaxes of 61 Cygni at about 3.948 parsecs, Alpha Centauri at about 1.34 parsecs, and Vega at about 7.68 parsecs.
Since then techniques for measuring smaller and smaller angles, and thus measuring smaller and smaller parallaxes and greater and greater distances, have been developed. The Hipparchos satellite measured the parallaxes of over 100,000 stars to an accuracy of 0.002 arcsecond between 1989 and 1993, while the Gaia satellite launched in 2013 is supposed to get parallaxes with an accuracy of 20 microarcseconds or 0.00002 arcseconds.
One method of increasing the accuracy of parallax measurements of distant stars is to increase the length of the baseline by taking measurements from distance regions of the solar system.
And once a faster than light space drive is invented, the accuracy of parallax measurements of distant stars can be increased 206,264.806 times by making observations from two observatories in interstellar space 2 parsecs apart on opposite sides of the solar system with a baseline 206,264.806 times as long as Earth or satellite based observations.
Orbiting near Earth, the Gaia satellite is expected to measure parallaxes with an accuracy of 10 percent out to the distance of the galactic center, which is about 8,090 plus or minus 310 parsecs, or 26,400 plus or minus 1,000 light years. Putting exact copies of the Gaia satellite 2 parsecs apart would increase the distance that parallaxes are accurate to 10 percent by 206,264.806 times, out to distances of about hundreds of millions of parsecs and light years.
Putting copies of the Gaia satellite at 2,000 parsecs apart would increase the accuracy a thousand times better than that. So by the time that an expedition is sent to the Andromeda Galaxy the distances to all the major stars, nebulae, and other important objects in our galaxy and nearby galaxies like the Andromeda Galaxy should have been measured very precisely.
So if the crew of a ship headed from our galaxy to the Andromeda Galaxy need to measure their position in space, they can try precisely measuring the angles to different astronomical bodies.
for example, the angles to the super massive black holes at the centers of the Milky Way Galaxy, the Andromeda Galaxy, and the more distant galaxy M87 in the Virgo Star Cluster can be very precisely measured.
If the spaceship is not on a straight line between the centers of the Milky Way and Andromeda Galaxies, their super massive black holes will not be exactly 180 degrees apart as seen from the space ship.
By measuring the the angles to the two super massive black holes, they might determine that the spaceship is 5 degrees off of a straight line between them as measured from the Milky Way's black hole and 1 degree off that straight line as measured from Andromeda's Galaxy's black hole. So the spaceship should be on the surface of a five degree angle cone around the line with the cone's point at the Milky Way's black hole and also on the surface of a one degree angle cone around the line with it's point at Andromeda's galaxy's black one. And the spaceship thus must be somewhere in a circle where the two cones intersect.
And if they make the same sort of calculations with the super massive black holes at the centers of the Milky Way and M87 galaxies, they can fix their position on another circle where two cones intersect, and there should be only one or two points where the two circles intersect.
There are several hundred globular star clusters in the various galaxies in the local group, and the angles to globular star clusters can be measured almost as precisely to those of super massive black holes. So finding the angles to two or more globular star clusters in the Andromeda Galaxy and two or more globular star clusters in the Milky Way Galaxy, for example, should enable them to fix their position fairly accurately.
And if they measure the angle to some astronomical body, perhaps the one selected to be their destination in the Andromeda Galaxy, very precisely, and then move the ship one parsec in a direction *0 degrees away from the direction to that object, and then remeasure the angle to that object, the difference in the angles will be the parallax and thus the distance of that object.
According to my knowledge of the current state of astronomy, the measurement of angles to find position in space is much more advanced and precise than the calculation of distance by the difference between the measured apparent magnitude and estimated absolute magnitude of an astronomical body. Of course once the distances and absolute magnitudes of Cepheid variables is known much more precisely due to more advance parallaxes, using them as distance indicators will become much more precise, but I do not know if it will every catch up and surpass the accuracy of parallax measurements.
And see these questions:
How to find earth's relative position anywhere in the galaxy without any markers or brute force exploration?1
How can I know where to point my spaceship?2
How would an astronaut conclude he's on Earth, but 600 million years in the future?3