Actually, I am now studying the A-Level
This is useful information to help frame answers.
From your original post which refers to a pretty sophisticated treatment I assumed your were studying this from a mechanical viewpoint at degree level.
For your information the example I gave came from my A level physics teacher back in the 1960s when he did exactly what I have described to demonstate resonance with a knotted hankerchief and a hanging 15kg weight.
Pushing a person on a swing is a similar example.
OK so let me start by stating that resonance is not primarily about energy - energy transfer or other energy considerations.
Resonance is basically about timing - which is another way of talking about phase.
Oscillation is about energy. In an oscillating system energy is continuously exchanged between two forms repeatedly cycling in a regular manner in time.
Resonance occurs between two such systems when energy or other quantity such as the momentum in my example is passed from one system to the other.
The systems do not have to be identical and the wave shapes of their oscillations do not have to be identical (again as in my example).
All that is required is that the repetition rate or frequency of both systems is the same and that the phase or timing of the transferred quantity matches.
I say that energy is not the best quantity to use to model the transfer because energy is a scalar and the point about resonance is that the timing and direction of the systems must match up.
Timing and direction is not taken into account with scalars. I could add energy to the pendulum with a blowtorch, but that would not induce resonance.
This was why I said that momentum is transferred. Momentum is a vector and considered in the A level syllabus.
As regards to the energy itself:
In theory, with no damping, each transfer of energy from the driving system to the resonating system will add without limit as you wondered at the beginning. All real systems impose limits so for instance the length of my pendulum limits the amplitude of the oscillation.
Energy not transferred from the driving system is obviously left in the driving system. This would be the case if my pendulum was struck glancing blows rather than head on impacts.
Hope this helps