Since machine learned super-resolution worked. Why should not do the same training for images with visible blockiness.
The idea is to degrade or hard compress images using some image compression algorithm to blockiness level. Use those images as the training and then as the target use the original images.
If this works than it would be possible to compress images to near ?the maximum.
The maximum ?would be unsupervised labeling of small objects in the image to text form and then machine learning to imagine what the image would look like.
So now you have a machine learning layer on top of chosen algorithm.
Perhaps this could work on youtube also. It would be possible to compress video on quality, not just on resolution. Then use the machine learning layer to correct the blockiness and resolution.
I think this is the way to do it. You have a standard algorithm in the back and a machine learning layer on top of it.