If I have both a Lucky Energy and a Gift Energy attached, what happens to a Pokemon if it receives enough damage to be knocked out? Do I get to choose the order of effects, or does one happen before the other.
You do not get to choose the order of effects. Lucky Energy's effect happens when damage is placed onto the Pokemon. Then Gift Energy's effect happens later when checking to see if the Pokemon is KO'd or not.
Source: TPCi Rules Team (2023-07-13)

Relevant cards

Note: All applicable cards may not be listed below.
SWSH11_171
SWSH11_171
SWSH6_158
SWSH6_158