well, here comes some bad news... (but with a solution)
as you already know, the key to access your effect data is through an
AEGP_EffectRefH.
unfortunately, this ref has a very short life span. you can't keep it from
a call to your plug-in, and expect it to work after that call has ended.
when you reach your idle hook, a kept effect ref will be invalid.
same goes for the mEffectRef you keep. if it's working, it a miracle. you
can't rely on it. (as far as i know)
some data has a longer life span. AEGP_LayerH, AEGP_CompH, and AEGP_ItemH
can outlast the call in which they were created.
i can't tell you if it's 100% safe, but i'm using these outside a call's
scope regularly.
the only full solution would be to store the item id for the comp, the
layer id for the layer, and the effect index on that layer.
then when seeking the effect at idle time, look for a project item with a
matching id, get the compH from it, look for a layer with a matching id,
get the layerH from it, then look at the effect at the stored index, and
see if it's indeed yours. (you can check it's match name to make sure)
yup.