Rename a modifier's name for multiple objects
Iterate over all objects (or all selected objects, in the following script). If the object supports modifiers, check if the looked for modifier name exists, if it does, rename it.
import bpy

previous_name_modifier = &quot;boolean1&quot;
new_name_modifier = &quot;MyBoolean&quot;

for obj in bpy.context.selected_objects:
    if not obj.modifiers:
        continue
    mod = obj.modifiers.get(previous_name_modifier)
    if mod:
        mod.name = new_name_modifier