Car engines usually have fail safe defaults if sensors give illogical information. I wonder why thats not the same with airplane engines. Probably a bit more complex operating environment.
Aircraft engines usually have double to triple redundancy of the computers... But if software is wrong on all 2 or 3 of them. There is no way to help.
Now about mechanical failsafe - the problem is that jet engine fuel control unit is very complex stuff - it has many inputs that very the amount of fuel to put put into the engine: altitude, airspeed, pressure, temperature, rpm and their sudden changes and more...
Once there were hydro-mechanical computers that did the job and flameouts were much more frequent. Today digital system allow to run the engine in much more hard conditions - the conditions that older fuel control systems would fail.