In this answer we generalize Birkhoff's theorem to arbitrary spacetime dimension $d>2$ with a cosmological constant $\Lambda$ and an electric charge $Q$.
The Einstein's equations read
$$\begin{align} R_{\mu\nu}-\left(\frac{R}{2}-\Lambda \right)g_{\mu\nu}~=~&\kappa T_{\mu\nu},\qquad \kappa~\equiv~\frac{8\pi G}{c^4}, \cr
~\Downarrow~&\cr
\frac{2-d}{2}R+d\Lambda ~=~&\kappa T, \cr
R_{\mu\nu}-\frac{2\Lambda}{d-2} g_{\mu\nu} ~=~& \kappa\left(T_{\mu\nu}-\frac{T}{d-2}g_{\mu\nu} \right).
\end{align}\tag{E} $$
In a spherically symmetric coordinate system there are first and foremost the time coordinate $t$ and the radial coordinate $r>0$. In order to treat all the angular coordinates on $\mathbb{S}^{d-2}$ on equal footing, let us use stereographic coordinates $Y^a$, $a\in\{1,\ldots, d\!-\!2\}$. The spherically symmetric ansatz for the metric tensor and the gauge 1-form becomes$^1$
$$\begin{align} ds^2~=~&-e^{2\alpha(r,t)}dt^2 + e^{2\beta(r,t)}dr^2 +4r^2\frac{dY^adY^a}{(1+Y^bY^b)^2},\cr
A~=~&\underbrace{A_t(r,t)}_{=-\phi(r,t)}dt+A_r(r,t)dr,\cr
&\text{Radial gauge}:~~ A_r(r,t)~=~0.
\end{align}
\tag{A}$$
The corresponding non-zero components of the Levi-Civita Christoffel symbols are
$$\begin{align}
\Gamma^t_{tt}~=~&\dot{\alpha}, \qquad
\Gamma^t_{tr}~=~\Gamma^t_{rt}
~=~\alpha^{\prime}, \qquad
\Gamma^t_{rr}~=~e^{2(\beta-\alpha)}\dot{\beta}, \cr
\Gamma^r_{tt}~=~&e^{2(\alpha-\beta)}\alpha^{\prime},\qquad
\Gamma^r_{tr}~=~\Gamma^r_{rt}
~=~\dot{\beta}, \qquad
\Gamma^r_{rr}~=~\beta^{\prime}, \cr
\Gamma^r_{ab}~=~&-\frac{4r e^{-2\beta}\delta_{ab}}{(1+Y^cY^c)^2}, \qquad
\Gamma^a_{br}~=~\Gamma^a_{rb}
~=~\frac{\delta^a_b}{r}, \cr
\Gamma^c_{ab}~=~&2\frac{\delta_{ab}Y^c-\delta^c_bY^a-\delta^c_aY^b}{1+Y^dY^d}
, \end{align}$$
where dot (prime) denotes differentiation wrt. $t$ ($r$), respectively. The non-zero components of the Ricci tensor are
$$\begin{align} R_{tt}~=~&-\left[\ddot{\beta}+\dot{\beta}^2-\dot{\alpha}\dot{\beta}\right]\cr &+e^{2(\alpha-\beta)}\left[\alpha^{\prime\prime}+(\alpha^{\prime})^2 -\alpha^{\prime}\beta^{\prime} +\frac{d-2}{r}\alpha^{\prime}\right],\cr
R_{rt}~=~&\frac{d-2}{r}\dot{\beta},\cr
R_{rr}~=~&-\left[\alpha^{\prime\prime}+(\alpha^{\prime})^2 -\alpha^{\prime}\beta^{\prime} -\frac{d-2}{r}\beta^{\prime}\right] \cr
&+e^{2(\beta-\alpha)}\left[\ddot{\beta}+\dot{\beta}^2-\dot{\alpha}\dot{\beta}\right],\cr
R_{aa}~=~&4\frac{e^{-2\beta}\left[r(\beta-\alpha)^{\prime} -(d-3)\right] +(d-3)}{(1+Y^bY^b)^2} \qquad(\text{no sum over }a). \end{align}$$
The scalar curvature is
$$\begin{align} R~=~&2e^{-2\alpha}\left[\ddot{\beta}+\dot{\beta}^2-\dot{\alpha}\dot{\beta}\right]\cr
& -2e^{-2\beta}\left[\alpha^{\prime\prime}+(\alpha^{\prime})^2 -\alpha^{\prime}\beta^{\prime} +\frac{d-2}{r}(\alpha-\beta)^{\prime} +\frac{(d-2)(d-3)}{2r^2}\right]\cr
& +\frac{(d-2)(d-3)}{r^2}. \end{align}$$
The Lagrangian E&M density is
$$ {\cal L}~=~-\frac{\sqrt{|g|}}{4\mu_0}F_{\mu\nu}F^{\mu\nu} +J^{\mu}A_{\mu}, \qquad F^{\mu\nu}~:=~g^{\mu\lambda}F_{\lambda\kappa}g^{\kappa\nu}, $$
so the metric/Hilbert SEM tensor becomes
$$\begin{align} T_{\mu\nu}
~=~&-\frac{2}{\sqrt{|g|}}\frac{\delta S}{\delta g^{\mu\nu}}\cr
~=~&\frac{1}{\mu_0}F_{\mu\lambda}F_{\nu}{}^{\lambda}
-\frac{1}{4\mu_0}g_{\mu\nu}F_{\lambda\kappa}F^{\lambda\kappa}.\end{align}$$
Because of the ansatz $(A)$ the SEM tensor takes a diagonal form
$$\begin{align} T^{\mu}{}_{\nu}~=~& \left( \delta_t^{\mu}\delta^t_{\nu} +\delta_r^{\mu}\delta^r_{\nu} -\frac{1}{2}\delta^{\mu}_{\nu} \right) \frac{1}{\mu_0}F_{tr}F^{tr}, \qquad F_{tr}~=~\phi^{\prime}~=~-E_r,\cr
~\Downarrow~&\cr
T^t{}_t~=~& T^r{}_r, \cr
T~=~& \left(2 -\frac{d}{2} \right)\frac{1}{\mu_0}F_{tr}F^{tr}.\end{align} $$
The argument is now as follows.
From the diagonal form of $g_{\mu\nu}$ and $T_{\mu\nu}$, and hence of the Ricci tensor,
$$0~\stackrel{(E)}{=}~R_{tr}~=~\frac{d-2}{r}\dot{\beta}$$
follows that $\beta$ is independent of $t$.
From
$$\begin{align}0~=~&\kappa\left(-T^t_t+T^r_r \right)+
\frac{2\Lambda-\kappa T}{d-2}\left(-\delta^t_t+\delta^r_r \right)\cr
~\stackrel{(E)}{=}~&-R^t{}_t+R^r{}_r\cr
~\stackrel{(A)}{=}~& e^{-2\alpha} R_{tt}+e^{-2\beta}R_{rr}\cr
~=~&\frac{d-2}{r}e^{-2\beta}(\alpha+\beta)^{\prime} \end{align}$$
follows that $(\alpha+\beta)^{\prime}=0$. In other words, the function $f(t):=\alpha+\beta $ is independent of $r$.
Define a new coordinate variable $T:=\int^t dt'~e^{f(t')}$. Then the metric $(A)$ becomes
$$ds^2~=~-e^{-2\beta}dT^2 + e^{2\beta}dr^2 +r^2 d\Omega^2.\tag{B}$$
Rename the new coordinate variable $T\to t$. Then eq. $(B)$ corresponds to setting $\alpha=-\beta$ in eq. $(A)$.
Maxwell equations in curved spacetime reads
$$\partial_{\mu} (\sqrt{|g|}F^{\mu\nu})
~=~ -\mu_0 J^{\nu}.$$
No current density $J^r=0$ implies that the electric field
$$F^{tr}~\stackrel{(B)}{=}~-F_{tr}~=~E_r$$
does not depend on time $t$. Gauss' law reduces to flat spacetime$^2$
$$\begin{align}
\int_{[t_i,t_f]\times r\mathbb{S}^{d-2}}d^{d-1}x~\sqrt{|g|}F^{rt}
~=~&\int_{[t_i,t_f]\times r\mathbb{B}^{d-1}} d^dx~\partial_{\mu} (\sqrt{|g|}F^{\mu t})\cr
~=~&-\mu_0 Q \underbrace{\sqrt{|g_{tt}(r)|}(t_f-t_i)}_{=\tau_f-\tau_i} \cr
~\Downarrow~&\cr
r^{d-2} E_r ~=~&\frac{\mu_0 Q}{\Omega_{d-2}}\cr
~\Downarrow~&\cr
\phi~=~&\left\{\begin{array}{lcl}
\frac{\mu_0Q}{\Omega_{d-2}}\frac{r^{3-d}}{d-3} &{\rm for}& d>3,\cr
-\frac{\mu_0Q}{2}\ln(r) &{\rm for}& d=3,
\end{array}\right.
\end{align}$$
where
$$\Omega_{d-1}~:=~{\rm Vol}(\mathbb{S}^{d-1})
~=~2\frac{\pi^{\frac{d}{2}}}{\Gamma(\frac{d}{2})}$$
is the volume of $\mathbb{S}^{d-1}$.
From
$$\begin{align}
\frac{\kappa\mu_0Q^2}{\Omega_{d-2}^2}\frac{r^{2(2-d)}}{d-2} g_{aa}
~=~&\left(\frac{1}{2} +\frac{2-d/2}{d-2}\right)\frac{\kappa E_r^2}{\mu_0} g_{aa}\cr
~=~&\kappa\left(T_{aa}-\frac{T}{d-2}g_{aa}\right)\cr
~\stackrel{(E)}{=}~&-\frac{2\Lambda}{d-2} g_{aa} +R_{aa}, \cr
~\Downarrow~&\cr
\left(\frac{\kappa\mu_0Q^2}{\Omega_{d-2}^2}r^{4-2d}+2\Lambda\right)\frac{r^2}{d-2}~\stackrel{(B)}{=}~&\left(\frac{\kappa\mu_0Q^2}{\Omega_{d-2}^2}r^{4-2d}+2\Lambda\right)\frac{g_{aa}}{d-2}\frac{(1+Y^bY^b)^2}{4}\cr
~=~& R_{aa}\frac{(1+Y^bY^b)^2}{4}\cr
~=~& e^{-2\beta}\left[r(\beta-\alpha)^{\prime} -(d-3)\right] +(d-3) \cr
~=~& -r(e^{-2\beta})^{\prime} -(d-3)e^{-2\beta} +(d-3)\cr
~=~& -r^{4-d}(r^{d-3}e^{-2\beta})^{\prime} +(d-3), \end{align}$$
(no sum over $a$), it follows that
$$ r^{d-3}e^{-2\beta}~=~
\left\{\begin{array}{lcl}
r^{d-3}-R_S^{d-3}+ \frac{\kappa\mu_0Q^2}{\Omega_{d-2}^2} \frac{r^{3-d}}{(d-3)(d-2)}
-\frac{2\Lambda r^{d-1}}{(d-1)(d-2)}&{\rm for}& d>3,\cr
C-\frac{\kappa\mu_0Q^2}{4}\ln(r)-\Lambda r^2&{\rm for}& d=3,
\end{array}\right. $$
for some real integration constants$^3$ $R_S^{d-3}$ and $C$. In other words, we have derived the higher-dimensional Reissner-Nordström-(anti)de Sitter solution aka. the Tangherlini solution
$$e^{2\alpha}~=~e^{-2\beta}~=~
\left\{\begin{array}{lcl}
1-\frac{R_S^{d-3}}{r^{d-3}}
+\frac{\kappa\mu_0Q^2}{(d-3)(d-2)\Omega_{d-2}^2} \frac{1}{r^{2d-6}}
-\frac{2\Lambda r^2}{(d-1)(d-2)} &{\rm for}& d>3,\cr
C-\frac{\kappa\mu_0Q^2}{4}\ln(r)-\Lambda r^2&{\rm for}& d=3,
\end{array}\right. $$
cf. Ref. 2. Remarkably the corresponding $d=3$ Newtonian $\ln(r)$ potential is nowhere to be found, cf. e.g. this Phys.SE post.
References:
M. Blau, Lecture Notes on GR; Chapter 31.
F.R. Tangherlini, Il Nuovo Cimento 27 (1963) 636–651.
--
$^1$ Notation and conventions. The metric signature is $(-,+,\ldots,+)$. We work in units where the speed of light $c=1$ is one.
$^2$ In $d=3$ it turns out that the spacetime is a wedge, so that the true charge (mass) is only a corresponding fraction of $Q$ ($M$), respectively.
$^3$ For $d>3$ by comparing with the asymptotic Newtonian limit $r\to\infty$, we may identify the integration constant
$$ R_S^{d-3} ~=~\frac{2\kappa M}{(d-2)\Omega_{d-2}},\qquad C~=~\kappa M,$$
where $M$ is the mass/total energy of the black hole.