Vel Nias gave almost the right answer in:
How to get the largest subset of a set of sets of intervals with no overlapping intervalsHow to get the largest subset of a set of sets of intervals with no overlapping intervals
but instead of the connected components we are looking for the maximum independent set in this graph.