Why is the drift of the stock price not important for options pricing? This question is motivated by MSE question 4199364: Bachelier model option pricing.
There, one considers the price of a stock depending on time $t$, given by the family of random variables $(S_t)_{t\in[0,\infty[}$ as
$$S_t = 1+\mu t+W_t$$ for some $\mu\in\mathbb R$, where $(W_t)_{t\in[0,\infty[}$ is a standard Wiener process. (Note that the precise form of $S_t$ is not important for the question asked below, for instance, one might ask the same question if $S_t$ is a, say, geometric Brownian motion, given by $S_t=S_0 \exp((\mu-\sigma^2/2)t+\sigma W_t)$ for constants $\mu\in\mathbb R$, $\sigma \in \mathbb{R}^+$ (i.e. the solution to $\mathrm dS_t = \mu S_t\,\mathrm dt + \sigma S_t\,\mathrm dW_t$, where stochastic differential notation was used), or more generally, any stochastic process with drift.)
The question was what the price of an option paying $1$ dollar (or any other currency) if $S_1>1$ and paying $0$ dollars if $S_1<1$ would be in an idealized market (as far as I know, the usual "idealized" market is characterized fully by some technical assumptions about which I know nothing and the condition that there is no arbitrage).
Now, naïvely I would expect the price of the option described above to be just $\mathsf P(S_1>1)$ dollars (where $\mathsf P$ is the probability measure of the probability space on which $(W_t)_{t\in[0,\infty[}$ was defined (sometimes called a "Wiener space")).
However, I was informed that, in fact, the price of the option is independent of $\mu$. Why is that so? Why does a higher probability of getting $1$ dollar not result in a higher price for the option?
 A: Hedging and replication warm-up
Let's begin with a warm-up game.
Suppose we are playing roulette, where if we bet $\$1$ on red and the roulette lands on that colour, then we get $\$2$, otherwise we get $\$0$. At this casino, however, we know that the roulette is biased so that $P(\text{Red}) = 0.7$ and $P(\text{Black}) = 0.3$. This funky casino also has a bookie who offers to sell you a lottery ticket which pays $\$100$ if this biased roulette lands on red and zero otherwise; the bookie is selling this ticket for $\$60$. Is this ticket cheap or expensive?

 The ticket is overpriced. If we instead place $\$60$ on roulette, then we have a potential $\$120$ payoff with probability $0.7$. The fair price for this ticket is $\$50$.
(Since, by betting $\$50$ yourself on red, you get the same payoff as with the ticket sold by the bookie, no matter on what colour the roulette ball lands.)

In the above example, the real-world probabilities did not affect the fair-value price of the ticket and the reason for this is the law of one price: two "portfolios" with the same payoff must have the price. This law gives rise to the principle of replication. The same principle holds true for financial derivatives.
One-period binomial market model
Let's consider the simplest possible market model: one stock $(S_t)$, one bond $(B_t)$, and times $t =0, 1$. The sample space is $\Omega = \{ H, T \}$, the risk free interest rate is $r \geq 0$ and at $t = 1$, the stock is either $S_1(H) = uS_0$ (with probability $p\in[0,1]$) or $S_1(T) = d S_0$ (with probability $1-p$), where $u$ and $d$ are known, and we have a European derivative $V = g(S)$ that pays $V_1(H)$ or $V_1(T)$ at time $1$. We assume that $0 \leq d < 1+ r < u$ (exercise: why?). We wish to determine the time-zero price of $V$, call it $V_0$.
If we begin with initial wealth $X_0$ and buy $\Delta_0$ shares of the stock at time zero, we are left with $X_0 - \Delta_0 S_0$, which we invest in the bond. At time  $t=1$, the value of our portfolio is $$X_1 = \Delta_0 S_1 + (1+r)(X_0 - \Delta_0 S_0) = (1+r)X_0 + \Delta_0 (S_1 - (1+r)S_0)$$
We wish to find $X_0$ and $\Delta_0$ such that $X_1(H) = V_1(H)$ and $X_1(T) = V_1(T)$; we do this by matching the discounted value at time zero of the stock+bond portfolio with the discounted value of the option payoff:
$$\begin{align*}
\begin{cases}
X_0 + \Delta_0 \left( \frac{1}{1+r}S_1(H) - S_0 \right) = \frac{1}{1+r} V_1(H) \\
X_0 + \Delta_0 \left( \frac{1}{1+r}S_1(T) - S_0 \right) = \frac{1}{1+r} V_1(T)
\end{cases}
\end{align*}$$
I leave it to you as an exercise to verify that
$$\begin{align*}
\Delta_0 &= \frac{V_1(H)- V_1(T)}{S_1(H) - S_1(T)} \\
X_0 &= \frac{1}{1+r} \left( \tilde{p}S_1(H) + (1-\tilde{p})S_1(T) \right)
\end{align*}$$
where $\tilde{p} = \frac{1+r - d}{u-d}$. By the law of one price we argue that $V_0$ should be the cost of setting up the replicating porfolio, so that $V_0$ is equal to $X_0$ found above. Note, in particular, that $X_0$ does not depend on $p$.
A continuous time model
Assume now a more realistic (yet idealised) situation where we have a market with a bond that gains compound interest $$ \mathrm dB_t = rB_t \mathrm dt$$ and a stock that follows a geometric Brownian motion $$\mathrm dS_t = \mu S_t \mathrm dt + \sigma S_t \mathrm dW_t$$
(The case for arithmetic Brownian motion is answered in the question you linked to). We have a European option that pays $V_T = h(S_T)$ at the maturity time $t=T$. E.g. for a European call option $h(S_T) = (S_T - K)^+$ or for the digital option you described above, $h(S_T) = \chi_{\{S_T > 1\}}$. We wish to find the price of this option for $t < T$, i.e. $V_t = f(t, S_t)$ (we can and will assume that $f \in C^2$).
To that end, we set up a replicating portfolio in the stock and bond $\Pi_t = a_t S_t + b_t B_t$. We require that this portfolio satisfy the self-financing condition: $$\mathrm d \Pi_t = a_t\mathrm dS_t + b_t\mathrm dB_t$$ which amounts to asking that during $0 < t < T$ there are no cash inflows or outflows. If we are to match the price of the option with the value of our portfolio we must demand that $\mathrm dV_t =\mathrm d\Pi_t$. By Itô's lemma: $$\mathrm dV_t =\mathrm df(t,S_t) = \left( f_t (t,S_t) + \frac{1}{2} \sigma^2 S_t^2 f_{xx}(t,S_t) + f_x(t,S_t)\mu S_t \right)\mathrm dt + f_x(t,S_t)\sigma S_t\mathrm dW_t. $$
Substituting the stock model in our dynamics for $\Pi_t$, we get: $$\mathrm d \Pi_t = (a_t \mu S_t + b_t r B_t)\mathrm dt + a_t \sigma S_t\mathrm dW_t$$
Matching the diffusion terms, we observe that our portfolio must hold $a_t = f_x(t,S_t)$ to hedge away the randomness in the stock. We call this delta-hedging. Using the value of our portfolio, this implies that $b_t B_t = \Pi_t - f_x(t,S_t) S_t$. Finally, matching the drift terms in $\mathrm dV_t$ and $\mathrm d\Pi_t$, we get: $$f_t (t,S_t) + \frac{1}{2} \sigma^2 S_t^2 f_{xx}(t,S_t) + f_x(t,S_t)\mu S_t = f_x(t,S_t) \mu S_t + r (\Pi_t - f_x(t,S_t) S_t).$$ By cancelling $f_x(t,S_t) \mu S_t$ on both sides and after replicating $V_t = \Pi_t = f(t,S_t)$, we obtain the famous Black-Scholes PDE:
$$f_t (t,S_t) + \frac{1}{2} \sigma^2 S_t^2 f_{xx}(t,S_t)  = r (f(t,S_t) - f_x(t,S_t) S_t)$$
Which has the terminal boundary condition $f(T,S_T) = h(S_T)$. Of note, the PDE does not depend on $\mu$, but it does depend on $r$.
Final remarks
Mechanically, we have been able to show that delta-hedging allows us to cancel away $\mu$ in our computation of the option price. Perhaps the one-period model can serve as intuition for why this happens: you may extend this to a multi-period model and then approximate the continuous time model arbitrarily by the multi-period model.
The answer I posted in the question you linked uses a different argument, which gets rid of $\mu$ via a martingale argument and Girsanov's theorem. This idea is alluded to in the link shared by @lulu, and you should consult it for a further and richer understanding for why $\mu$ vanishes away in our pricing formula.
Finally, you can't ask for $S_t$ to be any "stochastic process with drift". A consequence of the Fundamental Theorem of Asset Pricing (see e.g. [1]) implies that the physical model for the stock price must be a semi-martingale, so something like a geometric fractional Brownian motion would not be an admissible stock model and this argument would fail for it (see e.g. page 170 in [2]).
[1] Delbaen, Freddy, and Walter Schachermayer. "A general version of the fundamental theorem of asset pricing." Mathematische annalen 300.1 (1994): 463-520.
[2] Biagini, F., Hu, Y., Øksendal, B., & Zhang, T. (2008). Stochastic calculus for fractional Brownian motion and applications. Springer Science & Business Media.
