There's still the tires to consider. Put a narrow, hard compound tire on a car, then put a wide, soft compound tire on the same car. Same brakes - Which car stops shorter?
Put better brakes on the narrow, hard compound car. Does it stop better than the car with Stock brakes and soft compound tires?
Tires are the primary conection with the ground, so they are important.
Now brakes. A driver with the same relative skills can stop shorter if the car's brakes are more easily modulated than if less easy. So brakes make a difference too.
There is a previous thread on this that goes a step further. The ABS systems are tuned to stock brakes and tires. There is a possibility of more braking distance by the ABS system with otherwise better than stock components because of the programming mismatch.
ALso, for more fuel in this fire, the suspension and brake geometry can affect braking distance too. Worn struts/shocks can cause the wheel to bounce off the ground, increasing braking distance. So better suspension components, alignment, bushings all contribute to braking distance too.
So, tires, brakes, driver,suspension, ABS system, all contribute to braking distance directly. They all interact with each other.