isContract has switched from extcodehash to extcodesize for less gas usage in this commit:
But as the important notes mentioned It is unsafe to assume that an address for which this function returns false is an externally-owned account (EOA) and not a contract. Therefore there would be cases that you would like a more secure check over gas usage. And I would propose to add back the EIP-1052 isContract function with a different name, maybe isSecureContract or something not sure.
I’m not sure I understand the distinction you make between empty and uninstantiated accounts. AFAIK, the only thing we can check is the emptyness/hash of the code stored at this address … and this will be empty both for an EOA, or a smart contract before (and during) deployment.
Is there anything else the EVM tracks that we could use?