If you are familiar with Blueprints or Python you can script a utility to batch through your assets, turn on lightmap UVs, and save them.
For example in Blueprint:
Create an Editor Utility Blueprint.
Choose Asset Action Utility as the class.
Create a function, call it something like “Generate Lightmap UVs”.
In the function, create a loop for selected assets to edit their Build Settings.
Beware that the “Make MeshBuildSettings” node has default values for all the attributes, and you will want to make sure they are the same as what is currently in your assets, with the exception of the LIghtmap UVs being turned on.
To use this function, select all the assets you want to edit in the content drawer, right click, and go to “Scripted Asset Actions”, and select your function.