You asked two things, really.
First part: accuracy
I think you are struggling with what you bolded in your question: the concept of exactness. And unfortunately, I think you will need to let go of that when it comes to Dominant Wavelength.
You did find the correct definition of Dominant Wavelength - the intersection of a line from a defined white point through your SPD's chromaticity values, as it crosses the spectral locus.
There will never be 10 significant figures in this calculation (as you are hoping to calculate the difference between 500 and 500.0000001). The chromaticity of the white points to use in calculating Dominant Wavelength is almost always offered with only 4 sig figs. This is not because their values stop at 4 decimal places, but instead is related to the accuracy that any SPD can be measured with. And your own SPD has inaccuracies in its measurement, also stopping at 4 sig figs for chromaticity.
So, the best you can do is interpolate between points on the spectral locus, or else define the spectral locus even tighter by using sub-nanometer 'pure' wavelengths with the tristimulus curves to get chromaticity values. And this will be plenty accurate enough.
Luckily, if your dominant wavelength is in the yellow-amber-red range, the spectral locus for CIE 1931 xy will be quite linear in this region, and a simple linear interpolation for the locus value is very accurate. This is because those pure wavelengths have no Tristimulus Z component, making the 'third' chromaticity value z=0, and are therefore defining two points along the line y = 1 - x. (Taken from x + y + z = 1, but z = 0.)
Anyway - the main point is that 'good enough' must be 'good enough'. Error assumptions were made in the SPD measurements, whether you have the details about them or not. More of the inaccuracy of Dominant Wavelength comes from inaccuracy in the starting points (your SPD, the white point you choose) than in the calculation itself. If the SPD is not exact, Dominant Wavelength can't be either.
Second part: meaning/interpretation
The second half of your question deals with the meaning of Dominant Wavelength. You said:
my best guess is that a photon of the dominate wavelength has the same
energy as the average (mean) photon produced by the light source.
The key point is the word dominant versus average. The average wavelength of the light source might not be the 'dominant' one. Dominant in this case has more to do with human perception of the SPD than the SPD itself. You could simply find the average or median wavelength from the SPD, but that doesn't tell us anything about human perception. Hence, to take human perception into account, Dominant Wavelength uses the CIE tristimulus curves (based on human perception) and performs a calculation with them.
About purple/magenta: there is no photon that can be purple or magenta. This color is 'made up' in our brains when blue and red photons are received at the same time. So yes, you can average the energies of these two photon wavelengths, and yes, there is still an undefined Dominant Wavelength for a chromaticity xy in this region.
To repeat: Dominant Wavelength has to do with human perception, and averaging photons is purely physics. We can't assign a purely physical conceptual notion to the definition of Dominant Wavelength. Dominant Wavelength can be understood as defining which monochromatic light best describes the hue we perceive an SPD to be. (Key here being the 'we perceive' part.)
Glossary:
SPD - Spectral Power Distribution
CIE - Commission internationale de l'éclairage (french for International Commission on Illumination)
Spectral locus - outer edge of the CIE Chromaticity Diagram, defined by the XYZ tristimulus curves.
Honestly, wikipedia does a good job of describing these in general.