Better: any homomorphism $f$ from the infinite symmetric group $S(X)$ ($X$ arbitrary set) to a locally compact group $H$ has a discrete image.
Proof: we can suppose that $f$ has a dense image.
(a) Case when $H$ is totally disconnected. Let $L$ be a compact open subgroup of $H$. Notation: $L^h=h^{-1}Lh$, $h\in H$. Consider $K=f^{-1}(L)$.
Recall that $L$ is commensurated in $H$, in the sense that the function $u_{H,L}(h)=\log([L:L\cap L^h])$ on $H$ takes finite values. Hence $K$ is commensurated in $S(X)$. By a result of Bergman (which easily follows from an earlier 1995 result of Galvin), every subadditive function on $S(X)$ is bounded. By a classical result of Schlichting 1980 (rediscovered by Bergman-Lenstra 1989), this implies that $K$ is groupwise transfixed, in the sense that there exists a normal subgroup $N$ of $S(X)$ that is commensurate to $K$. By Baer's classification of normal subgroups of $S(X)$, normal subgroups of $S(X)$ have no proper subgroup of finite index, with the only exception of the finitary subgroup and its subgroup of index 2. Hence replacing $N$ by a subgroup of index 2 if necessary, we can suppose that $N$ has no proper subgroup of finite index; so $K$ contains $N$ as a subgroup of finite index. Since $N$ has no proper subgroup of finite index, it has no nontrivial homomorphism into any profinite group. So $N$ is contained in the kernel of $f$, and hence $L$ is finite, and hence $H$ is discrete.
(b) General case. By (a), $H/H^\circ$ is discrete, so $H^\circ$ is open. Define $N=f^{-1}(H^\circ)$, then $f(N)$ is dense in $H^\circ$. We conclude by (c) below that $H^\circ=1$, so (a) applies.
(c) Let $N$ be any subquotient of $S(X)$ and $P\neq 1$ a connected locally compact group. Then $N$ has no nontrivial homomorphism $v$ into $P$ with dense image (no continuity assumption).
Proof 1: suppose by contradiction that there's one; modding out the kernel, we can suppose $v$ injective, and modding out $P$, we can suppose that $P$ is Lie, and then that $P$ is either the circle group or a connected simple Lie group with trivial center. The group $P$ being linear, it has all its finitely generated subgroups residually finite (Malcev). So $N$ inherits this property. From Baer's classification of normal subgroups of $S(X)$ (and the simple observation that these are the only subnormal subgroups, see Scott's 1964 book Group Theory), all subnormal subquotients of $S(X)$ contain all countable groups as subgroups, except the finitary subgroup, modulo 1 or modulo the alternating subgroup. We can discard the latter by connectedness. So $N$ is the finitary symmetric group; it is locally finite and not virtually abelian, which is impossible in a linear group in characteristic zero such as $P$. Contradiction.
Proof 2 (without using solution to Hilbert's fifth problem?). The proof by Galvin implying that all subadditive functions on $S(X)$ are bounded adapt without change to all its normal subgroups except those contained in the finitary subgroup. Given this, when $N$ is not contained in the finitary subgroup, and using some word length on $P$ with respect to a compact generating subset, we deduce that $P$ is compact. Then by Peter-Weyl, we can assume that $P$ is Lie compact (and connected). At this point we can conclude as in the first proof by Malcev. An alternative is to use that any infinitely generated field is union of a properly increasing sequence of subfields to deduce that every infinitely generated subgroup of a compact connected Lie group is union of an increasing sequence of proper subgroups ("cofinality $\omega$"), which clearly implies the existence of an unbounded subadditive function. Applying this to the image of $N$ in $P$, we deduce that this image is finitely generated, but again using a word length argument, we deduce that the image is finite, and finitely connectedness forces $P=1$.
It remains the case when $N$ is the finitary subgroup or its alternating subgroup of index 2. In this case I can conclude as in Proof 1 but this makes use of Hilbert V. I have to think if we can conclude by another argument (to discard the possibility of a dense embedding of an infinite alternating group into a connected locally compact group).
References:
G. Bergman and H. Lenstra. Subgroups close to normal subgroups. J. Algebra 127,
80–97 (1989).
YC and Pierre de la Harpe. Metric geometry of locally compact groups.
EMS Tracts in Mathematics, 25. European Mathematical Society (EMS), Zürich, 2016. arxiv link (See Example 4E15 for link between Galvin and boundedness of subadditive maps)
Fred Galvin, Generating countable sets of permutations, J. London Math. Soc. 51 (1995), 230–242
G. Schlichting. Operationen mit periodischen Stabilisatoren. Arch. Math. 34, 97–99
(1980).