To get nearly all segements you could try the following:
1. Do the recursive bounding box approach to get segments
2. Get each leaderboard from segments you get in step 1
3. Get Koms from each athlete in leaderboard
4. Loop koms and check if bounding box contains kom segment (start or/and end point)
You have to check for duplicates and this can take a while. So Caching could be useful. This approach assume that the riders from the top 10 segments in bounding box also owns koms in your area. This works for me. i found a few "hidden" segments.