Recent disruptions to air travel, banking, and other critical systems have raised questions about the reliability of aging technology—and the risks of upgrading it.