I can definitely see the NBA overtaking the NFL at some point, but I think that point is still quite a ways off.
Having said that, the NBA is probably already ahead of the NFL worldwide, and that will matter more as streaming of games continues to expand.
The NBA has the whole “playing the game won’t take a decade or more off your life expectancy” thing going for it too. Further, the NBA commissioner is well liked by ownership, players, and fans. The league is also much better at exploiting new tech for improving performance and in their marketing (as referenced here).