The only possible solution to doping
There's only one way to minimize doping (note I did not say eliminate it): You set a minimum time to finish the race and anyone who's faster than that is elminated. So basically you're saying something like: "Whoever crosses the finish line first in 98 hours or more (and NOT less) wins the race. If you finish in 97 hours you're disqualified." And you'd do the same for every stage too. That's it. There's no other solution.