What I had in mind when I suggested Miat's addon above was that we could check if the character is crouched by checking that the stealth state is not NONE, as per the enumeration below:Unfortunately there is no way by the API to detect if you are crouching and invisible or just invisible, afaik.
The icon at the crosshair shows you the current state and that's about the danger addons could do, so basically you got what is possible already.
Even if one would try to save the last state before invisible it could change during you invis time by getting detected and then the problems to properly detect that would start (as you said already: lag,...). The game does that before the lua code of addons trigger so it would be best to rely on the given info, and not try another addon to improve that: which should be impossible due to the fact that the addon would even come after vanilla game code, so it adds another delay (even if minimal) there.
StealthState STEALTH_STATE_DETECTED STEALTH_STATE_HIDDEN STEALTH_STATE_HIDDEN_ALMOST_DETECTED STEALTH_STATE_HIDING STEALTH_STATE_NONE STEALTH_STATE_STEALTH STEALTH_STATE_STEALTH_ALMOST_DETECTEDIs that feasible? I've done almost no ESO UI coding.