Guess what? It WAS a result of capitalism/outsourcing.
According to Portugal News:
Union leaders said that Carris workers had repeatedly reported insufficient tension in the Glória Funicular’s support cable, which was causing difficulties in the braking system. They also said staff had long argued that maintenance of the lifts should return to Carris rather than remain outsourced, citing “successive complaints” and differences between previous in-house work and the private company currently undertaking maintenance. In 2018,
reported that one of the Glória Funicular’s cars had derailed, though no one was injured and the carriage did not overturn. It simply left the rails and came to rest on the cobblestones, so the incident passed largely unnoticed. The company neither disclosed the accident nor answered journalists’ questions. The newspaper’s investigation, however, found serious maintenance failures in the vehicles’ wheelsets, visible to the naked eye. The wheels of a rail vehicle have a flange, a “lateral lip” that keeps them guided on the rail; to prevent excessive flange wear, wheels must be periodically turned on a lathe to maintain the correct profile. “Wheel wear was almost total, which led the funicular’s wheelsets to jump the rails,” the report concluded.