MTB Manufactures and Upgrade-ability
The linked article is a bit more of a rant than anything scientific.  High end $5000 bikes, especially road bikes, are not built to last - they are built light to go fast and trade durability to do so. A frame does not make a bike - in fact on a $5000 bike, a new frame will cost maybe $1000 - hurts and expensive, yes, far from a write off. Buyers of $5000 bikes understand this. Mid-range bikes are less likely to suffer the same problems as people tend to keep them longer and expect them to last. These bikes are mass produced in high volumes - so plenty of spare parts are manufactured, and held in stock. One way to save money as a manufacturer is not hold spare parts, so cheap bikes tend to have parts problems as well but these bikes are rarely worth the labour cost for a repair anyway. 

Parts compatibility and vendor lock-in are not a problem in the cycling world, it was an effective monopoly for so long, and is still a duopoly, all parts are relatively interchangeable. The main mounting points etc on frames are all standardized (there is often more than one standard, so getting the right parts is important).

If you search other posts asking similar questions you will see my personal opinion is that upgrading a bike over time is a very expensive proposition and never gives a good bike for the outlay. Parts are expensive to the extent that it is no uncommon to buy a new donor bike to upgrade a frame, rather than buy individual parts - purely because it is much cheaper. 

Best option is buy the bike you can afford today, and live with it till you can buy a better one. Buy a better quality used bike, of even better, last years model on 50% discount (The main difference is usually colour) rather than pay sticker price for this years model. 

To alleviate your fears about parts availability, stick to big brands, stay away from chain stores, and consider a bike is a collection of distinct, easily replaced parts - unlike say a car.