Optimal high-precision shadow estimation