Currently profiles are based on Quality and in addition, the quality can be given a range of size. Size is really a difficult way of getting the quality by a preferred encoding. Often the x265 is really good quality and small filesize, but it’s not always available, so then x264 is would be an option. However, getting the right thing by just using Quality and Filesize is difficult. I think preferred Encoding would really help with this.
You should be able to do this with a release profile and specifically the “Preferred” terms section where you can add scores to terms in the release (i.e. “x265” could be preferred to “x264”).
I have used this previously when I specifically wanted “HDR” or “DV” on a specific series. In my case I used “Must Contain” but it seems you are okay with x264 if it is the only version available so you would do it with “Preferred” weighted terms. It should work although I have not tried it myself.