The fact that Facebook, a company far richer than Bell labs ever was, like all FAANG, has a culture of expensive employees baby sitting broken software products (rather than lab researcher vs field technician separation), and cannot be bothered to do the long term investment in a new OS, is why I think the industry actually doesn't deserve these R&D tax breaks HN was bemoaning had gone away until this year.
The point of R&D is the time horizon is long, and the uncertainty is high. Making JS slop that then has to be constantly babysat is opex, not capex.