the question is how we can get out of this trouble.
What trouble you are talking about?
A metatable of a host object must not be accessible to untrusted guest code inside a sandbox.
(independently of whether __gc field exists in the metatable or not)