Another way to approach this would be to ignore the initial polyline geometry (since it is just the segment length ratios you actually care about), and initialise by dividing the smooth curve at t values in those ratios to make a new polyline. The lengths won’t be correct but would be close enough to give a good starting point for the optimisation, which then gives the accurate result.
(Note that you can set any target ratio between lengths, it doesn’t have to be the ratio they start out with)
These are simple ways with existing built in goals, but it is also true that it can sometimes be helpful to have a goal which enforces point order along a curve so the t value of each point can only ever be higher than the one before. I did write something for this some time back: