If something is calculated using constant values it itself must surely be constant, right? Can't see any way out of that.
Lets say the physics engine runs at 30 ticks/second, and a corner takes 3 seconds to naviage. 90 ticks. For the first 20 ticks I brake, then I turn for the next 70. The braking takes me from V0 to V20. When we turn in our grip is dependant on V20. The grip at tick x is going to dependant on Vx throughout the turn.
(Although this does not automatically prove me right, I will start by saying that I'm a physicist and I have programmed a few simulations, of other type).
You overcomplicate by far the problem, it is not rocket science (TBH, neither rocket science is "rocket science") to find a very good (maybe not the ultimate optimal, but physics are about getting a "good enough" solution) race line. I can give you the first order approximation for any isolated turn: the maximum radius trajectory. Of course you can start thinking about early and late apex hitting, I don't think it is worth it and the AI in this game is already cruder than this approach.
Now you have a radius of curvature, which together with the friction coefficient and the mass of the car dictates the maximum speed that you can take it. The friction coefficient is a hellish mixture of parameters which gets immensely simplified when you take in account that those parameters are heavily quantized in the program (there are not tenths of degrees of precision in wing angle, we have just 11, I bet you have 2 grip levels per tyre -cold/hot- modified by the state of the track -what, 10 levels of humidity?, probably even less, and most part of them can be taken as a constant during the whole turn). Once you calculate the maximum speed you know how much space you need to brake before turning. Done. If the car is overtaking, it needs to take a different line, just get the maximum curvature restricted to pass a point in the inside of the turn. And when I say a point, I don't mean a mathematical infinitesimal precision point, the collisions are determined by the bounding boxes of the cars, so any precision thinner than the car wingspan is just not worth it. And so on.
All the physics, by the way, are already implemented (better or worse) for your car, so you don't have to replicate the algorithm and actually reusing it is fairer (so you and the AI will be aided/bugged equally from the same implementation).
I will point, however, that the solution of crudely pre-script the non visible cars is perfectly fine for me. The method is not what is wrong, what fails is that
nobody cared in CM to test-run each circuit and fine tune the lap times, the turn speeds, etc. In short, they had a year to do what a dozen or so of modders, with just partial knowledge or the implementation and having to figure out the effect of each parameter, will eventually manage to do in a month or so. And that is... a bit shameful.