One way of making it interesting is gamifying with manager games. For anyone who doesn't know what those are they're basically prediction games with virtual budgets used to select riders who earn points for accomplishments in the real tour. You compete against thousands of others on the ranking list (and private leagues).
I used to play those, but not anymore.
Apart from that a lot is up to the quality of the local production. While all channels receive the same footage from the ASO, there are still major differences. Commentators, pro-commentators (usually ex-world tour riders), on-scene reporters, pre-made footage, relevant replays (not just instant, but maybe a highlight from the last time the peloton was here 18 years ago), and last but not least, frequency, duration and timing of commercial breaks.
I'd say the commentators are the most important factor in such long broadcasts.
- Interpersonal chemistry and balance (a good fit is required. this goes on for 3 weeks)
- Precision (identifying exactly what happens and who are involved in unclear situations)
- Knowledge (teams (their owners, directors, history, goals), riders (roles, strengths, weaknesses, inside info), area/cultural (facts and stories about what we see en route))
- Intuition (tactics, sports director gamesmanship)
Luckily for me the same channel has owned the rights to TdF for 20 years straight, with high-budget productions and incremental improvements over time.
With that being said, I'm not the most invested viewer. After I stopped playing manager games I'm basically only interested in the GC battle and riders from my own nation. That means most flat stages are still kind of boring.