Basketball is the sport of the future, like it or not. It’s cheap, doesn’t take up much space, can be played indoors or outdoors, and is incredibly flexible to play with varying numbers of people. Its popularity is growing everywhere regardless of socioeconomic or demographic factors. It’s a testament to the popularity of hockey in Canada that basketball hasn’t completely eclipsed it there.
But if it does happen, hockey will still be huge in Canada amongst the entire population. And more likely, it won’t surpass it regardless, as it’s not like the NBA is ever going to have more than two or three Canadian teams.
That may be true, realistically Vancouver and Montreal are the only Canadian cities that have a shot at landing a NBA franchise anytime soon. But the CEBL is on an impressive growth trajectory for a six year old league. It's just starting to move from major junior hockey buildings into NHL sized buildings. So between the NBA and the CEBL, basketball could potentially establish a pretty big pro footprint in Canada.
Anyway, I don't think that basketball/soccer's advantages are related directly to cost (although it is a factor) so much as they are to fewer barriers to entry in general. Playing hockey in Canada generally requires your parents to take a series of steps beginning in your preschool years. They have to buy the gear, teach you how to skate, then sign you up for Timbits hockey, then sign you up for minor hockey, and keep doing it every year. By contrast, you get exposed to basketball/soccer at school, in gym class and in the schoolyard. Then if you like it and want to play, you can join a school team. Your parents don't have to do it for you.
The last thing on a lot of immigrant parents' minds is signing kids up for skating lessons at 3 and then hockey at 4 or 5. And once the kid develops an interest in hockey naturally at 8 or 9, it's pretty tough to get into the game. Not impossible, but you are starting pretty far behind at that point. This is not an issue with basketball or soccer, it's far easier to jump in at those ages.
I don't doubt that hockey will remain big, but it will go from being the main attraction to another item on Canada's sports buffet alongside basketball, soccer, football, baseball, lacrosse, etc.