Suppose we have a (measurable and suitably well-behaved) set $S\subseteq B\subset\mathbb R^n$, where $B$ is compact. Moreover, suppose we can draw samples from the uniform distribution over $B$ wrt the Lebesgue measure $\lambda(\cdot)$ and that we know the measure $\lambda(B)$. For example, perhaps $B$ is a box $[-c,c]^n$ containing $S$.
For fixed $\alpha\in\mathbb R$, is there a simple unbiased way to estimate $e^{-\alpha \lambda(S)}$ by uniformly sampling points in $B$ and checking if they are inside or outside of $S$?
As an example of something that doesn't quite work, suppose we sample $k$ points $p_1,\ldots,p_k\sim\textrm{Uniform}(B)$. Then we can use the Monte Carlo estimate $$\lambda(S)\approx \hat\lambda:= \frac{\#\{p_i\in S\}}{k}\lambda(B).$$ But, while $\hat\lambda$ is an unbiased estimator of $\lambda(S)$, I don't think it's the case that $e^{-\alpha\hat\lambda}$ is an unbiased estimator of $e^{-\alpha\lambda(S)}$. Is there some way to modify this algorithm?