Is it possible for you to create some master materials ahead of time with all the things you’ll need to change created as parameters? When you import the FBX files, don’t create/import new materials. In python, create instances of your master materials and change the values you need. Then assign them to the FBX (which I only know how to do manually) .
You can also create new materials programmatically if you know what needs to be there. Then assign them to the FBX. But if all the materials have the same nodes, but with different values, then you’re probably better off creating the master material.