I second the use of a drill press or guide to keep the hole perpendicular to the stock face. My approach was different, avoiding the use of a T-nut by using a threaded insert which doesn't require drilling into the barrel channel side of the stock.
I've installed rails on three carbon stocks: X-bolt factory, Stockys VG, and Peak 44 Black tooth. For each, I used the front sling swivel stud, plus a drilled and tapped a 5/16-18 hole for a threaded ski binding screw insert (Binding Freedom brand) which has internal 4mm threads. The insert was epoxied in with either Double Bubble Orange or West G-Flex, which are both very impact-resistant epoxies that sticks well to metal, carbon fiber, foams, and plastics. I then taped off the outline of the rail and sanded this area of the stock, and sanded the bottom of the rail to roughen up the finish, then glued it to the stock, tightening down the sling stud and threaded insert screws snugly.
Gluing the rail to the stock adds a ton of strength in addition to the threaded insert. Even with both screws removed, I cannot pull off an epoxied rail without heating it to soften the epoxy. The threaded insert increases surface area for thread contact and allows the rail to be removed (after heating it to release epoxy. Instead of the threaded insert you could use a very coarse thread, tapered head 5/16" screw that is about 1/2" long.