Add new expressions to existing scripted expressions in driver?
I managed to solve this myself. The problem was that Blender overwrites the value of the expression each time the driver is created when calling driver_add(). Instead I get the old value from the driver in animation_data before creating the new driver and save that as a string. Then I split the string by "+", check each string if it ends with the pose bone name, and if it does, I replace the value rather than adding it again. Finally I set the expression to the new string (after adding the pieces of strings back together).