It is true that for user-defined materials, it would be really interesting the use of optimization for each one presenting the responses for the best material in the determined problem. I think, if you want the best candidate point for some inlet conditions, editing boundary parameters is not a good idea because you will have a mix of parameters and it has no value.
If someone think it would be possible to assign the material as a input parameter in direct optimization, I would be happy to see how I could do that.