How does the FADEC prevent compressor stall during rapidly increasing thrust demand?
Of course it depends on the engine, and the exact how is proprietary information. That being said, nowadays jet engines are designed to allow faster acceleration than before. So it's not just the fuel rate the FADEC controls.

COMPRESSOR AIRFLOW CONTROL
To limit compressor surge and to provide good acceleration, the engine
is equipped with a Variable Bleed Valve (VBV) system and a Variable
Stator Vane (VSV) system.
Both systems are fuel operated by the HydroMechanical Unit (HMU)
and controlled by the Electronic Control Unit (ECU).
— CFM56-5B training manual

As for the parameters being monitored, first let's look at the common stations:

(Source)

With the basic station numbers now known, let's look at what the ECU (part of the FADEC) monitors and controls:



During testing, data for the optimal accelerations for all conditions (forward speed, air density, engine angle of attack, etc.) is collected. From there the FADEC is programmed to stay within those limits.
If a pilot demands full thrust from idle on ground on a hot day, the FADEC will have an idea of the initial fuel flow and rate to supply, and how to control the variable stators and bleed. From there it will monitor the many parameters, and adjust accordingly.
The same can be achieved on older engines using purely hydro-mechanical systems, but of course not as efficiently. There are of course different ways to override the FADEC and demand more power than the FADEC was designed to allow.
For the CFM above, the fuel flow commands depend on:


engine oil temperature,
Fuel Level Sensing Control Units (FLSCUs) shut off signal,
A/C on ground and low fuel flow return level,
A/C in flight and low or high return fuel flow level,
N2 speed,
engine fuel flow demand.



This flightglobal.com article about the GE flying testbed discusses the benefits of fine tuning the FADEC from real data including extreme angles of attack.

We think of the FADEC monitoring system as being like a screwdriver. We're using it to adjust and fine-tune the turbine clearances in real time by using the data to modify the control software and make it more efficient.
(...)
[Testing at] angles of attack of between 30° and 32°. The high-inlet-angle test is required for fan-stress and inlet-stability evaluation.


Trivia: In the making of the 777, the management wanted to skip the in-flight testing of the P&amp;W engine (the first 777 engine). As those tests cost millions. They eventually played it safe and tested it on a 747 testbed, guess what happened:

The engine surged on its third takeoff, despite the numerous static tests they made.