Prior to the introduction of async/await (or promises) there were a number of places we used a similar technique inside Firefox to avoid callback spaghetti.
For us it caused no end of problems, and were glad to see it go (well, there are still probably some places using it...).
It's not surprising to me that it's discouraged.