I had a look at plane *) toy racetracks and I tried to figure out under which conditions the tracks for the two cars have equal length.
Assuming all curves consist of circular arcs $1 \ldots N$ with various different radii $r_n$ and angles $\phi_n$ it is easy to show that the condition reads
$$ \sum_n \phi_n = 0 $$
i.e. that all angles sum up to zero.
OK.
Now I would like to generalize this to arbitrary plane **) curves $X(s)$. Using the Frenet-Serret formulas one finds
$$ \oint \kappa = - \oint ds \, (\dot{X}, J\ddot{X}) = 0 $$
Here $\kappa$ is the signed curvature, $J$ is a $\pi/2$ rotation, $s$ is the arc length and the dot represents differentiation w.r.t. to s.
This is nice because it indicates that this is something like a “topological invariant”. The question is which one? It seems to be related to the number of self-intersections ***) of the racetrack. Are there any ideas for further reading?
*) that means that only straight segments are allowed for bridges; or equivalently that bridges must not contain curves
**) that means I omitted one torsion term
***) in reality: bridges
I found the relevant information about the turning number and the total curvature.