Are you saying gaining energy is inherent to either taking damage or dealing damage? The former should be easy to test: launch no attacks, and dodge no moves.
The second is as of now I suppose still POSSIBLE in a weighted sense, if only that we know that one of the lowest damage-dealing moves in the game, Fury Cutter, generates the most energy.
You should replicate the test a couple times with low HP pokemon in gyms, and/or pokemon that know Fury Cutter and against pokemon that resist and that are weak to bug.
~
I was and am relatively certain that energy generated is simply inherent to the move though, and I don't know why there is a STAB weight on the "EPS" of STA moves on the various pokemon pages here.