I was exposed to a good part of the book Icarus, enough to get a fairly comprehensive rundown of the life of Lance Armstrong, and the doping universe that cycling existed in during those days.
As I remember, dodging discovery by testing was about the medical technology and techniques they were using to stay well ahead of the testing protocol. At that time, the testing was never going to catch them, due to their very sophisticated approach to not getting caught. The testing didn’t test for their methodology.
Armstrong could deny and lie with absolute confidence that testing science would not prove him wrong. Because he knew that testing science wasn’t yet well-developed enough.
It was the leaking of the truth from human sources that finally brought enough to light that investigations couldn’t ignore it.
It is possible that chicanery still follows cycling. Read once that in the world of sports betting, cycling results are some of the most dependent on the athletes, with the least influence by outside random factors such as weather and road conditions, that heavily affect many other sports. All racers are in the same outside conditions, all doing the same basic thing - keeping up, and speeding up, at the right times.
There is a powerful incentive to give oneself more help than is allowed, because it works. It improves performance and placings, regardless of outside conditions. The guy who dopes best is likely to finish very well, even win.