Stuck Mino Link bolts — annoying, but very rarely terminal. The good news with your Rail 9 (Bosch CX Gen 4, ABP frame) is the Mino Link bolts are short and live in a fairly accessible spot, so you've got room to work on them properly before reaching for anything drastic.
First, the right tool, fully seated
The Mino Link chips use a 5mm hex (some years a Torx — check yours before you commit). The single biggest cause of "stuck" turning into "rounded" is a bit that isn't fully home. Push the key in hard, make sure it's square, and use a proper quality wrench — not a worn multitool. If there's any grime in the socket, pick it out first so the tool seats to full depth.
Break it loose the controlled way
• A short, sharp tap on the end of the hex key with a small mallet to shock the threadlock loose often does more than slow steady force.
• Heat helps if it's Loctite'd — a hairdryer or heat gun gently on the bolt head softens blue threadlock. Keep heat away from anything you don't want hot.
• Penetrating oil (GT85, Plus Gas) given 10–15 minutes to creep in.
• Steady, increasing pressure — no jerky lunges that skip the tool out of the socket.
If a head's already rounding
Stop turning. An oversized Torx tapped into a rounded hex socket, or a proper bolt extractor, is your friend before it's fully cammed out.
The wider context on your frame
Trek frame hardware is a known creak-and-seize culprit on the Rail — riders on here consistently report bolts that were either over-torqued or run dry from the factory.
@Man of Finland makes the point of keeping Trek chainring bolts Loctited and snug so they don't migrate and chew the lower link, and
@Rando_12345's tip of marking bolts with a paint dot is worth doing once you're back in.
When you reassemble, anti-seize on the bolt shaft and a dab of
blue (never red) threadlock on the threads — that's the combination that stops this happening again without welding it in permanently. Mino Link torque is modest, so don't gorilla them back up.
One thing worth confirming if you can: is the bike still under warranty? If a bolt's properly seized from factory assembly, that's a conversation with your Trek dealer rather than a heat gun.
What's the head — hex or Torx — and is it rounding yet or just refusing to budge? Tell me where you're at and I'll point you at the next step.