I would like to upgrade a carbon fiber bike (Scott CR1) to Ultegra Di2 with internal wiring. Can I drill a hole where the cable holders are located (one next to the fork, one near the bottom crank & one at the rear, close to the derailleur) in order to route the cables inside ?
This is one of those questions where if you have to ask "should I do this?", the answer is "no". Carbon frames need to be specially reinforced (during manufacturing) in the areas that drilling takes place see, for example, this discussion, and you could create stress concentration points or otherwise compromise the integrity of your frame.
The words "catastrophic frame failure" are not ones that you want to hear, particularly from your hospital bed.
After some research, I'd like to differ very slightly from the existing answers. It may be possible for consumers to drill holes in their carbon frames, or really frames of any other material. However, when you drill a hole in something, you produce a stress concentrator. If that area takes subsequent stress, it could fail at that stress concentrator. One analogy, given in this Cyclingtips article on a different subject, is the perforations in toilet paper. When you pull at the toilet paper, it fails by design at the perforations. If your frame were to fail due to any holes you drilled, you would be the responsible party. It can be difficult for consumers to know where on the frame to safely drill - i.e. which areas take less stress while riding and/or where there would still be a sufficient safety factor if you did drill. Also, there are precautions and techniques that you should use while drilling to minimize the chance of damage.
Basically, I do not recommend that anyone drill their frames. I might consider doing so on an older steel bike of mine, or I might consider in the rare case where I had a carbon bike where the manufacturer put out guidelines for drilling. I'd be more likely to ask a framebuilder (for metal bikes) or a carbon repair shop to consider drilling a frame.
That said, if you Google for "Cervelo S2 S3 Di2 drill", you should find some instructions about drilling wiring holes in these frames, which are 2009-2011 models. The 2010 S3 was a light frame, and it did already have internal shift cable routing. Cervelo gave instructions on where on the frame to drill, and what size of holes they thought were safe. Specifically, they asked users to drill one hole 12mm behind the existing cable shifter entry holes on the top of the top tube, and to enlarge two existing holes (one at the bottom of the bottom bracket shell, and optionally the drainage/relief hole at the rear of the right dropout). They presumably made those recommendations with some rationale: they may have known that the layup was thicker in the area of the top tube they highlighted. They hopefully analyzed or had some idea of how much stress the drilled areas sustained in riding, and they presumably knew or thought that there was enough of a safety margin remaining if the BB hole were enlarged, etc. Most consumers are unlikely to have that prior knowledge. You may also find a few carbon repair shops that offer to refit frames. Calfee does, and they reinforce the new holes. I believe this service isn't restricted to their own frames (they are a framebuilder), because they offer carbon repair services more generally.
If you search for advice drilling carbon fiber, you may come across some tips that should reduce the chance of doing unintended damage. For one, if your drill bit snags fibers rather than cutting them cleanly, that could cause a later failure. I found some assertions that ordinary drill bits will wear out quickly, and bits coated with carbide or diamond may work better for repeated uses. Cervelo did recommend sanding the hole with a dremel to remove rough edges. Working with carbon fiber may be more common in some other hobbyist communities, such as some water or motor sports communities, so you might think about seeking advice there.
Peter Chisolm, a former shop owner and active cyclist, drilled holes for Campagnolo EPS in his older steel Eddy Merckx, as covered in a 2017 article in Cyclingtips. He was advised by two well-known steel framebuilders that this would be OK. However, this was an older Merckx, and I would bet that the tubing is relatively thick, so there would likely be a sufficient safety margin.
Also consider that SRAM makes rim brake versions of its Force and Red 12s AXS wireless groups, which don't require any holes to be drilled. SRAM, in a recent Cyclingtips podcast, stated that they were going all in on wireless hydraulic disc groups, so I would infer that their wireless rim brake offerings may not be a priority going forward, but users could still consider these. (I focus on rim brakes because a bicycle that you think you need to drill for electronic wiring probably uses rim brakes.) Also, Shimano is likely to release a semi-wireless version of its Di2 electronic groups. If they continue to offer rim brakes, which I think likely (NB: personal opinion only), this reduces the number of holes you would need to drill.
well . my anwser here https://bicycles.stackexchange.com/a/76643/56594 , certainly relates to this question too.
in resume, when you go to do DIY mods always consider the many options available of fixing/attaching things and choose(or test first) the ones which does not damage the original parts.