That is definitely the simplest way and the added overhead of setting an additional variable every step is really negligible. I know the Nekoron Engine defaults to having a screen-sized sprite and on collision with player does with(other)djump=true; but that is even less efficient than just setting the variable every step.
I guess the most optimized way to do it would to add a global variable to the playerJump script, that allows you to double jump if djump==true OR if global.infJump==true, and just set that true/false as needed. But assuming your game isn't tottering on the edge of crashing, just setting djump=1 every step will work just fine
