Updating curve handles by location of other objects
Assumption: If your graph has approx 50k junctions, I will assume you will import/generate such graph with python in blender.

If I were you, I would do all the animating also with python. If you do that, you also don't need to set all the hooks with python (yay!).


When you'll be building the graph, store junctions and connections into some list. You should use some nice classes for them and remember inside them what belongs to what and also remember data paths to each connection ends and handles vertices.
Then you create a function that will receive such list via a global variable and that will edit all junction positions and connections vertices and handles according to current frame. The function only takes 1 parameter - the scene.

def update_fce(scene):
    # get data
    global list

    # get frame
    frame = scene.frame_current

    # here move stuff to where it is supposed to be at frame
    return

The last step is to add this function into frame change callback list so it is called everytime the frame is changed:

bpy.app.handlers.frame_change_pre.append(update_fce)