Yes, which is why I wrote:
... XRF of indigo might show those two nitrogens clearly enough to distinguish one blue dye from another ...
To expand that thought, the 2-nitrogen signal is different than the 0-nitrogen signal, the 1-nitrogen signal, the 3-nitrogen signal, the 4-nitrogen signal ... thus, perhaps, allow you to reliably distinguish 2-nitrogen indigo from blue dyes with 0-1-3-4-etc nitrogens.
The real limitation on XRF-for-philately, as it is for so many things, is sample preparation.
For example, how to separate the ink/dye from the paper fibers, or to reliably subtract the XRF signal of the paper fibers so as to only be looking at the XRF signal of the ink/dye?
The easiest design-around would be to look for an element that is only present in the ink/dye, and would 'never' (sic) be present in the paper fiber; an example of that might be a heavy metal which, if more prevalent in one ink/dye than another, and blessedly rare in paper, would allow you to reliably distinguish one ink/dye from another.
Sadly, as you would quickly learn, preparations of inks/dyes were not deliciously precise; boiling leaves or insects or animal bits (professionally known as a water extraction) was supplemented & refined as time went on, but a 19th century bottle of indigo is not going to be a late 20th century bottle of reagent grade indigo.
Great puzzles to be solved well before you get to solving the philatelic puzzles.