Another option is just to temporarily disable eldoc during the duration
of the Company completion session.
Right.
And yet another solution would be to detect that Eldoc will be used,
and try to plug into its documentation functions to display the meta
thingy alongside the other info.
That's at least 3 potential solutions now.
I think you should do the "bookkeeping" one, at least a very simple
version. Just record in your concept of a "company session" if there
was ever a non-nil :company-docsig sent from anywhere that required
echoing. Until there is, never clear on nil :company-docsig.
Eventually, if there is something to echo, tough luck: display it and
proceed as currently, clearing always on nil, risking flickering.
Suspect this should fix 95% of the cases, certainly Eglot usages.