The naive estimator is biased. If there are $N$ trials and $i$ success, a Rao-Blackwellisation of the naive estimator gives the unbiased estimator $\frac{2l}{d}\left(\frac{n}{i}+\frac{1}{i}\right)$ (to be fair this hides an assumption for a uniform prior for the probability of crossing, which induces a weird prior on $\pi$).
One can look at the variance of the estimator conditional on obtaining one success. The strategy is then to set $l=d$. Intuitively this makes sense, we want the term in $1/i$ to be as small as possible. (ThoughThough for n$n$ small enough, it looks like the minimum mayprior dominates and the optimum is actually be achieved for a lowsmall value of $\frac{2l}{d\pi}$ )$2l/(d\pi)$.