Please forgive this naive question from a beginner trying to learn.
I apologize for the gross way in which I'll describe feedback and error-correction: it shows that I don't really know them, but my question is not really to explain me those things, I'll be able to find my way about that.

It's rather a "disturbing" idea that I've had ever since (*) somebody drew those "A" and "B" boxes, summed *at the input*

So here we go:

Negative feedback works by feeding a differential amplifier with an input and a re-attenuated output.

Error correction works by subtracting the error from the input, before amplifying it (probably a gross way to describe it).

But did anyone explore the possibility to adjust the gain of the amplifier, based on the error?

Hey, if this is THE idea (but I know it can't be), whoever patents it and becomes rich, please "share with the input (me) an attenuated replica of the output"

(*)
that was at at high school, a generic "Systems Theory" course in a computer science school, I only now see the real applications in electronics, through this hobby

It can be done, but bad things happen in the vicinity of the zero crossing - if the input to the variable gain section is near zero, you have to make massive corrections to the gain for a fixed output error.

If you avoid this problem by working with a unipolar system with all signals are far from zero, sitting on a big fixed offset, it turns out not to do much good - because you can expand the behaviour of the system using a Taylor series, and the first order term is just the same as you would get from additive feedback.

Variable gain is most commonly met in the AGC systems of tuners, where it acts on different time scale to the audio signal and removes fading and similar effects.