Is a "Master upscaler" profile possible?

I’m wondering if there’s a way to upscale my library in full, without destroying my HD space. Basically, I’m looking to add a profile that will upscale any episodes to 1080p (x265) first, then, if that isn’t available, it’ll drop to 720p (x265), if that isn’t available, it’ll drop further down the list until some real old shows I have are only dealing in SD format. I’d probably want to set a limit on the individual episode sizes too, say, a maximum of 1GB for certain shows, but allowing an extra 1GB for certain shows that I want to get a bit better picture quality. I just don’t want reality TV stuff that my missus likes to be like 1.4gb an episode, especially those with tons of seasons/episodes.

I think I may have to set a few profiles up and just choose the required profile for each show, but all the options within Sonarr are kinda frying my brain.

Anyone have some solid info, or know of a good guide anywhere that I can have look at? I have 2 old hard drives with tons of shows on that I want to upscale, but I want to be prepared first, as my friend said he upscaled a few shows but they went and grabbed huge files, so obviously his settings weren’t sufficient.

Any help is appreciated.