How to rename uvmaps in multiple objects
I figured out a very simple answer. First rename all uvmaps to something random like "bnoterp" that is not anywhere. That changes all (primary?) uvmaps to that name. Then after that rename all of them to "UVMap". That way the script does not create new uvmaps called UVMap.001 when it finds uvmaps with the same name as the script.