Proof that we will never obsolete human beings. The problem with machines is that they have to be trained and have “experienced the event” in order to know how to react to it. Humans are really good at adapting to brand new situations.
The nav system in this airplane is probably a complicated control system. A control system that is only as good as the design engineers who designed it. One of design rules in a control system is convergence and stability and an oscillation, which apparently happened, is a major no-no.
So the engineers must design the system to account for this possibility and failure and when it happens, switch to a minimal known state, whenever there is a problem. In other words, turn off autopilot and the control system itself and allow the pilots to take control of the aircraft. The aircraft must be able to be flown in this minimal state (in all conditions) so that the aircraft can be returned to the airport.
This requires a pilot trained in this contingency. As you mentioned, the pilots may have not been well trained.
Of course, it is easy to armchair quarterback.