How to prevent lossy re-encode of low-bitrate videos uploaded to YouTube
Youtube applies different maximum bitrates to different HD formats. A lot of people these days upscale their original 1080p HD content to 4k, since youtube allows higher datarate for 4k. Probably the same applies to 720p vs. 1080p, you should check. In general, you can optimize a video a lot so the same bitrate encoding will result in better quality, mainly by denoising it beforehand - or in you case, deblocking. I don't know if you are aquainted with AviSynth etc. but there are a couple of deblocking filters for it which might come in handy. From my experience there is no big difference if uploading a h264 with a high bitrate (like 25Mbps) or a ProRes file, after Youtube recompression quality is the same.