It's nice to see someone, other than myself, who loves the tour de france. I've watched it religiously for the past 20 years. I know of the incidents you refer to but I don't feel that anything underhand or unfair was carried out by the race organisers.
I love Peter Sagan but when it gets to the nitty gritty of the stage, the finishing sprint, which is his domain, he is ruthless. He is well known for using his head and elbows to shimmy his way through to a more advantageous position. I was there at the 2014 finish in Sheffield where he nearly killed Mark Cavendish at about 70kph, on stage one I think it was!!! He was sent home from the race and Cavendish was injured so badly he pulled out. So what makes Peter Sagan a great bike rider can, on occasion be his downfall too.
On the bike check. Sadly mechanical doping is as commonplace in the peloton as riders doping. Though I must add it's not nearly as common as it was as back in the day of Mr Armstrong! Routine checks are carried out by race officials regularly and I can say with a high degree of certainty that Primoz Roglic's bike wouldn't have been the only one checked out. If his bike was damaged in some way it's not really a big deal nowadays, the riders have several well tuned bikes each, both race bikes and aero bikes that they can use. What do you think happens if a rider falls off his bike in a crash and snaps his carbon frame in two!! He just jumps on a replacement. It's not generally a bike that will let a rider down, it's his legs!!
And the incident regarding Julien Allaphilippe and his drinks bottle collecting antics is plain and simply his own fault. The race had passed the 20km to go marker, I think they were 18km from the finish, when he took that bottle. It states within race rules that no extra drinks are to be taken, other than what you have on your bike, once you are within the 20km to go mark. I'm not overly familiar with the semantics of it all, i'd have to dig deeper in this one but the rules are the rules.
I'm just glad that i've found someone who gets as animated as me over bike riding! Maybe we'll have to start out own annual Tour de France thread, lol. We'll be the only two participants!