In this particular scenario, you're supposed to have fairly similar FR for both headphones, so attempting volume matching does make a lot of sense. Now I see 2 big rabbit holes you can decide to jump into:
1/ if you're going to work out how to measure the signal, chances are that you'd get a better FR match if you just measured both headphones you own with that setup instead of relying on other pairs measured by someone online.
It means more work for you obviously. But also it means potentially a much closer match between the headphones. Here is the giant rabbit hole; If you want to take it one step further and match not just the frequency response but also the time domain from impulses, then I'd suggest to go all the way and get yourself(or make) binaural microphones, the little capsules you stick in your ears. Then you'll get to measure both headphones the way they sound on your head instead of on some random dummy head. You can probably get some advice on those mics in the Impulcifer thread in here that like autoEQ, was made by Jaakko.
https://www.head-fi.org/threads/recording-impulse-responses-for-speaker-virtualization.890719/
That's a deep, hair pulling sort rabbit hole, but also one that can be immensely gratifying once you give up on copying headphones and start copying speakers with impulcifer(you can get an actual soundstage with your headphone!!!! not the 20cm crap with no reverb we call good soudstage on normal headphone listening, real stuff at a distance!!!!! Yum yum! ).
2/ The potential for matching can becomes really good up to a point. No matter what you end up doing, no matter how serious you are and how much money and efforts you invest in this, be it basic matching with a cellphone using one test tone and autoEQ or full on convolution measured at your own ears, the result is unlikely to be audibly exactly identical. With the absolute best approach, there is still some uncertainty with placement, noises, the need for the binaural mics to absolutely not move at all between measurements, and of course the inherent ability of the headphone to be objectively transparent. All headphones have their own distortions profiles and own damping, no matter how good the measurement, the resulting signal is cycled through an imperfect, sometime heavily EQed, transducer. The direct take away is that you could come close, very close. But expecting identical sound is unrealistic. Also, the better the headphone used to imitate another, the closer you can hope to get. HD800 and Stax headphones have been suggested often for stuff like that over the years but newer objectively good headphones with an already pretty smooth FR probably work great too. Which in itself sort of defeats the purpose as what we all want is to use cheap comfy headphones and make them sound like the great and expensive ones. Not the other way around.
Actual answer to your question:
If you want to stick with a cellphone, I'd say play like a 1kHz test tone into your headphones(or another frequency if you see chaos in the FR of one headphone at 1kHz), and use anything that gives you better than 1dB readings. Ideally we need less than 0.1 so that we won't notice and mistake loudness difference for something else but realistically you will get other causes for perceived difference anyway. Testing headphones will be biased and swapping will take too long! It's not going to be the absolute test that means everything even with a solid <0.1dB difference. Just do your best.
Then find some cardboard boxes and make something roughly the width of your head so it can be used to hold the headphones kind of like you would wear it(in term of clamping force at least) while nicely sealing the pads against the cardboard surfaces if at all possible. It's very important if you end up measuring low frequencies, otherwise the impact should be more moderate, just avoid measuring low or high frequencies if there is a giant gap somewhere and the positioning is uncertain(tiny changes could have massive impact on high freqs, but you can just fool around and see for yourself what is stable and what isn't).
try to insert the mic area of the phone near the center of the area where the headphone driver will be. And then while playing the test tone, just adjust the playback level on your audio player.
I don't know for others, but in Foobar2000 you go to "File"->"Preferences"->"Advanced", scroll until you find "Playback" and the specific line "Volume step (dB)" that you can click on to set 0.1. Then you get out off all that and while playing your test tone, you move your mouse over the volume slider and use the mouse wheel to adjust the output in 0.1dB increments until it matches what you had measured on the first louder headphone on your phone app.
Then it's just a matter of writing down those volume levels from foobar and getting back to them when you switch headphones. It will add some more delay on top of changing headphones, but you're already in a not so reliable situation anyway. I think the volume level values is shown on the bottom right of Foobar2000 by default, if not just right click on the bottom line and check "show volume".
The more accuracy you will desire, the crazier you will get with all the extra variables you can't completely control. Welcome to hell, AKA trying to test something properly that involves headphones.