The answer depends on $f$ and its relationship with the distribution of $X.$
Ultimately, provided you use a reasonable procedure to compute a confidence interval for $p = E[f(X)],$ what matters is the sampling distribution of $Y = f(X).$ Let's study that.
I have formulated three innocent-looking binary functions $f$ for examination. I plot them in relationship to the standard Normal distribution with $\mu=0,$ $\sigma=1,$ so that the blue portions under the Normal curve are where $f=1$ and therefore the total area (in blue) is the value of $p$ in each case.

$f_1$ at the left indicates when $X$ is relatively large in magnitude. $f_2$ in the middle is a thresholding function, indicating when $X\gt 0.$ $f_3$ at the right indicates whether the integral part of $X$ is odd. In all three cases, $p = 1/2.$
The maximum likelihood estimate of $p$ based on $X$ is going to work well (except, perhaps, for tiny samples). It is obtained from a dataset $(x_i), i=1,2,\ldots, n$ by estimating
$$\hat\mu = \frac{1}{n}\sum_{i=1}^n x_i$$
and
$$\hat\sigma = \sqrt{\frac{1}{n}\sum_{i=1}^n (x_i - \hat\mu)^2}.$$
The MLE of $p$ is then
$$\hat p = \int_{-\infty}^{\infty} f(x) \phi(x;\hat\mu, \hat\sigma)\, \mathrm{d}x$$
where $\phi$ is the Normal density with the given parameters.
A reasonable estimator (also the MLE) of $p$ based on $Y$ is the usual sample proportion,
$$\hat p_0 = \frac{1}{n} \sum_{i=1}^n Y_i = \frac{1}{n}\sum_{i=1}^n f(X_i).$$
The values of this estimator are discrete: they are limited to $\{0, 1/n, 2/n, \ldots, (n-1)/n, 1\}.$
To compare two estimators (or, almost equivalently, two confidence interval methods), we study how much they vary from one sample to another. In the histograms below, a narrow histogram will be superior to a broad one.
Anyone contemplating a bootstrap for anything other than a toy problem has a largish sample -- surely $n=25$ or larger. Here, then, are the results of simulating a thousand standard Normal samples of $X$ of size $25$ and estimating $p$ for these three binary functions.
First, $f_1:$

You can see the discreteness of $\hat p_0.$ Its sampling variance is $(0.1 / 0.64)^2 \approx 2.4$ times greater than the sampling variance of $\hat p.$ This means the estimate based on $Y$ requires a sample size about $2.4$ times greater than an estimate based on $X$ to achieve the same precision.
Next, the thresholding function $f_2:$

The spreads are similar, but the estimate based on $X$ remains superior.
Finally, the integer-part function $f_3:$

The estimate based on $X$ is almost one hundred times better than the estimate based on $Y:$ what you can accomplish with $25$ observations of $X$ requires over two thousand observations of $Y.$
($f_3$ was inspired by Method 8 at https://stats.stackexchange.com/a/117711/919. The analysis there shows that unless $\hat\sigma \ll 1,$ the estimate of $p$ is going to be extremely close to $0.5.$ The point is that although $X$ might be uncertain, $E[f(X)]$ scarcely varies in many circumstances.)
The intuition suggested by these examples is that when $f$ has a detailed structure, a detailed understanding of $X$ leads to much better information about $p$ than mere examination of the values of $f.$
This intuition continues to work well when you explore other functions or vary the parameters $\mu$ and $\sigma$ or modify the distribution of $X$ or choose alternative estimation (or confidence interval) procedures. We may summarize these results loosely but memorably:
Discretizing the values of a random variable loses information.