What is the quantitative theory behind this?
The chicken is more stable the greater the restoring force or torque. See the right side figure below for an example of restoring torque where a force is applied from the left so chicken's left foot just leaves the ground.
An attempt to topple the chicken by tipping it on its right foot (facing the chicken) (point A) by the application of the force F through the center of gravity (COG) of the chicken giving it a clockwise torque (moment), is opposed by the counter clockwise torque about A due to the weight of the chicken acting through the COG. The sum of the moments about A is shown in the figure, where counter clockwise moments are considered positive. Equilibrium is when the sum is zero.
Note that for the chicken to topple over the torque due to the applied force has to exceed the restoring torque due to the chicken's weight, or
When the force is removed, the counterclockwise torque acts to restore the chicken to standing on both feet. Note the following:
The lower the COG (lower the value of $h$) the greater the force $F$ needed to topple the chicken making the chicken more stable, all other things being equal.
The wider the chicken's feet are apart (the greater $L/2$), the greater the force $F$ needed to topple the chicken, making the chicken more stable, all other things being equal.
In both cases, the greater the stability of the chicken the greater the displacement of the COG to the right needed to topple the chicken.
If I give you an arbitrary object mesh, it's center of mass, and its
position and orientation, can you give me a formula to determine if it
is stable or not?
Not sure what you mean by "an arbitrary object mesh", but as your link explains a system is said to be in stable equilibrium if, when displaced from equilibrium, it experiences a net force or torque in a direction opposite to the direction of the displacement. So any formula will involve a net force or net torque.
Hope this helps.