This answer addresses the OP's original question by a mathematically rigorous deduction. In deference to the earlier answer, the notation adheres to it as much as necessary and in particular we denote the cut-off frequency of the low pass filter (LPF) by $0<\omega_c:=2\pi f_c:=\frac{1}{\tau}$ (denoted by $\frac{1}{\tau}$ in the OP and previous answer) which is measured in the units radians per second (${}^c/s$), wherein $f_c=\frac{\omega_c}{2\pi}$ denotes the cut-off frequency measured in the units Hertz ($Hz$) and $0<\tau$ denotes the time constant of the LPF, and the sampling time by $\Delta t$ (denoted by $T$ in the OP and previous answer). In what follows, the variable of time is denoted in the subscript. Further, note that the notation used is in opposition of that in the previous answer since we denote by $\omega_c$ the cut-off frequency unnormalized (and unit less) $\Omega_c$ normalized by the sampling frequency $\frac{1}{\Delta t}$, that is, $\omega_c = \frac{\Omega_c}{\Delta t}$.
The impulse invariant discrete formulation of the ideal low pass filter is obtained from the solution to the first order linear differential equation of the scalar (one dimensional) differential equation corresponding to the Laplace transform of the filter $H(s) := \frac{Y(s)}{U(s)} := \frac{\omega_c}{s + \omega_c} = \frac{1}{\tau s + 1}$ $\equiv \dot{y} = -\frac{y}{\tau} + \frac{u}{\tau}$ for all $0 < \tau, \omega_c$, as (see equation (19) of these lecture notes)
$$
y_{t+\Delta t} = \rm{e}^{-\omega_c (t+\Delta t-t)} y_{t} + \int_t^{t+\Delta t} \rm{e}^{-\omega_c((t+\Delta t)-t^{'})} \; \omega_c u_{t^{'}} \; dt^{'}
\\= \rm{e}^{-\omega_c\Delta t}y_{t} + \rm{e}^{-\omega_c(t+\Delta t)} \int_t^{t+\Delta t} \rm{e}^{ \omega_c t^{'} }\; \omega_c u_{t^{'}} \; dt^{'}
\\\stackrel{\Delta t \rightarrow 0}{=} \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \omega_c u_{t+\Delta t} \;\int_t^{t+\Delta t} \rm{e}^{ \omega_c t^{'} }\; dt^{'}
\\{=} \rm{e}^{-\omega_c \Delta t}y_{t} + \frac{\rm{e}^{-\omega_c (t+\Delta t)}}{\omega_c} \; \omega_c u_{t+\Delta t} \; (\rm{e}^{ \omega_c ({t+\Delta t}) } - \rm{e}^{ \omega_c t })
\\{=} \rm{e}^{-\omega_c \Delta t} y_{t} + u_{t+\Delta t} (1 - \rm{e}^{ -\omega_c \Delta t })
\\{=} \rm{e}^{ -\frac{\Delta t}{\tau} } y_{t} + u_{t+\Delta t} (1 - \rm{e}^{ -\frac{\Delta t}{\tau} }).
$$
on applying the limit as $\Delta t \rightarrow 0$ for the input $u_t$ at the time instant $t$. Denoting $0 < \alpha := 1 - \rm{e}^{ -\omega_c \Delta t } = 1 - \rm{e}^{ -\frac{\Delta t}{\tau} } < 1$, we recover the standard exponential moving average filter (exponential smoothing) formulation of the LPF expressed in discrete time formulation as $$y_n = \alpha u_{n} + (1 - \alpha) y_{n-1}.$$ Note that $\tau = \frac{1}{\omega_c } = -\frac{\Delta t}{\ln(1 - \alpha)} \equiv \omega_c = \frac{1}{\tau} = -\frac{\ln(1 - \alpha)}{\Delta t}$ and that if the sampling time interval $\Delta t$ is significantly smaller than the time constant $\tau$ or the sampling is significantly faster than the time constant, $\frac{\Delta t}{\tau} << 1$, then $\alpha = 1 - \rm{e}^{ -\frac{\Delta t}{\tau} } \approx \frac{\Delta t}{\tau}$. Further, note that typically $\alpha$ is a small number compared to $1-\alpha$, that is $0 < \alpha = 1 - \rm{e}^{-\frac{\Delta t}{\tau}} < 1-\alpha = \rm{e}^{-\frac{\Delta t}{\tau}} < 1$ since the constraint $\Delta t < \tau$ applies in practical implementations. This implies that the new information or input is weighted lower than the output at the previous time step in the filtering algorithm obtained, which is essentially a signal smoothing scheme.
The one step (first order) backward Euler discretization of the ODE associated with the standard HPF analyzed here results in the formulation $y_n = \tilde{\alpha} u_n + (1-\tilde{\alpha})y_{n-1}$ where the associated smoothing or discrete filter constant is defined as $0< \tilde{\alpha} := \frac{\Delta t}{\tau + \Delta t} <1$.
Note that the choice of the time step used in evaluating the integral in the mathematical manipulation above was chosen to be $t+\Delta t$ rather than $t$ by insisting on consistency with the formulation obtained by rudimentary backward Euler discretization.
Indeed, the above derivation illustrates the mathematical manipulation by which the impulse invariant (and in this case also equal to the matched Z-transform) Z-transform of the s-domain Laplace transform $H$ is obtained.
As noted in the previous answer, the impulse invariant transformation of the ideal or s-domain analog low pass filter to the z-transform would lead to increasing errors as the frequency approaches the Nyquist frequency. The relevant quote from the wiki addressing the impulse invariant transformation is as follows.
Note that aliasing will occur, including aliasing below the Nyquist frequency to the extent that the continuous-time filter's response is nonzero above that frequency. The bilinear transform is an alternative to impulse invariance that uses a different mapping that maps the continuous-time system's frequency response, out to infinite frequency, into the range of frequencies up to the Nyquist frequency in the discrete-time case, as opposed to mapping frequencies linearly with circular overlap as impulse invariance does.
More specifically, the bilinear transform maps s-domain frequency response features of the desired filter to that of the transformed z-domain filter.
The transform preserves stability and maps every point of the frequency response of the continuous-time filter, ${\displaystyle H_{a}(j\omega _{a})}$ to a corresponding point in the frequency response of the discrete-time filter, ${\displaystyle H_{d}(e^{j\omega _{d}T})}$ although to a somewhat different frequency, as shown in the Frequency warping section below. This means that for every feature that one sees in the frequency response of the analog filter, there is a corresponding feature, with identical gain and phase shift, in the frequency response of the digital filter but, perhaps, at a somewhat different frequency. This is barely noticeable at low frequencies but is quite evident at frequencies close to the Nyquist frequency.
Additionally, we can also obtain a discrete approximation of the classical continuous time high pass filter (HPF) from the transfer function $H(s) = \frac{\tau s}{\tau s + 1}$ $\equiv \dot{y} = \frac{-y}{\tau} + \dot{u}$ as follows
$$
y_{t+\Delta t} = \rm{e}^{-\omega_c (t+\Delta t-t)} y_{t} + \int_t^{t+\Delta t} \rm{e}^{-\omega_c((t+\Delta t)-t^{'})} \; \dot{u}_{t^{'}} \; dt^{'}
\\= \rm{e}^{-\omega_c\Delta t}y_{t} + \rm{e}^{-\omega_c(t+\Delta t)} \int_t^{t+\Delta t} \rm{e}^{ \omega_c t^{'} }\; \dot{u}_{t^{'}} \; dt^{'}
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \cdot \rm{e}^{-\omega_c t} \cdot \int_t^{t+\Delta t} \dot{u}_{t^{'}} \; dt^{'}
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \cdot \rm{e}^{-\omega_c t} \cdot \frac{u_{t+\Delta t} - u_t}{\Delta t} \cdot \Delta t
\\= \rm{e}^{-\omega_c \Delta t} y_{t} + \rm{e}^{-\omega_c \Delta t} (u_{t+\Delta t} - u_t),
$$
wherein the definition of the smoothing parameter consistent with the LPF analysis presented above, $0 < \alpha = \rm{e}^\frac{-\Delta t}{\tau} < 1$, recovers the standard formulation of the HPF expressed in discrete time formulation as
$$y_n = (1-\alpha)(u_n-u_{n-1}) + (1-\alpha)y_{n-1}.$$
The one step (first order) backward Euler discretization of the ODE associated with the standard HPF analyzed here results in the formulation $y_n = (1-\tilde{\alpha})(u_n - u_{n-1}) + (1-\tilde{\alpha})y_{n-1}$ where the associated smoothing or discrete filter constant is defined identically to that in the LPF case for consistency, $0< \tilde{\alpha} = \frac{\Delta t}{\tau + \Delta t} <1$.
Notice that applying integration by parts, as below, yields the following erroneous discretized HPF filter formulation which contradicts that obtained by rudimentary one step (first order) backward Euler discretization, so that the mathematical manipulation employed is incorrect and is therefore discarded in favor of the deduction above.
$$
y_{t+\Delta t} = \rm{e}^{-\omega_c (t+\Delta t-t)} y_{t} + \int_t^{t+\Delta t} \rm{e}^{-\omega_c((t+\Delta t)-t^{'})} \; \dot{u}_{t^{'}} \; dt^{'}
\\= \rm{e}^{-\omega_c\Delta t}y_{t} + \rm{e}^{-\omega_c(t+\Delta t)} \int_t^{t+\Delta t} \rm{e}^{ \omega_c t^{'} }\; \dot{u}_{t^{'}} \; dt^{'}
\\\stackrel{\text{by parts}}{=} \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \bigg( \rm{e}^{\omega_c t^{'}} u_{t^{'}} \bigg|_{t}^{t+\Delta t} - \int_t^{t+\Delta t} \omega_c \rm{e}^{ \omega_c t^{'} } u_{t^{'}} \; dt^{'} \bigg)
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \bigg( \rm{e}^{\omega_c (t + \Delta t)} u_{t + \Delta t} - \rm{e}^{\omega_c t} u_{t} - \int_t^{t+\Delta t} \omega_c \rm{e}^{ \omega_c t^{'} } u_{t^{'}} \; dt^{'} \bigg)
\\\stackrel{\Delta t \rightarrow 0}{=} \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \bigg( \rm{e}^{\omega_c (t+\Delta t)} u_{t + \Delta t} - \rm{e}^{\omega_c t} u_{t} - \omega_c u_{t} \int_t^{t+\Delta t} \rm{e}^{ \omega_c t^{'} } \; dt^{'} \bigg)
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \bigg( \rm{e}^{\omega_c (t+\Delta t)} u_{t + \Delta t} - \rm{e}^{\omega_c t} u_{t} - \omega_c u_{t} \frac{1}{\omega_c} (\rm{e}^{\omega_c(t + \Delta t)} - \rm{e}^{\omega_c t}) \bigg)
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + \rm{e}^{-\omega_c (t+\Delta t)} \; \bigg( \rm{e}^{\omega_c (t+\Delta t)} (u_{t + \Delta t} - u_{t}) \bigg)
\\= \rm{e}^{-\omega_c \Delta t}y_{t} + (u_{t + \Delta t} - u_{t}).
$$