I'm trying to determine exactly how the equivalence principle affects GR mathematically (rather than conceptually). I found this StackExchange post which more or less says that the equivalence principle is what allows you to represent the gravitational field with a metric tensor. However, I'm not really convinced that's the case: in Kaluza-Klein theory you can represent EM (together with gravity) in terms of a metric tensor, and there's no EM equivalence principle. In fact, I'm pretty sure the dilaton scalar field in Kaluza-Klein theory violates the equivalence principle so it cannot be fundamental to the concept of "geodesics in spacetime" (since this is what Kaluza-Klein theory is).
Another answer to that same question touches on this and mentions something about the equivalence principle implying that there's no torsion tensor. I was wondering if someone could expand on this. Does this mean that the fact the metric connection is torsion-free is a consequence of the equivalence principle?