Here's an answer to the mathematical part of the question (namely Q2).

An example is the group of adeles. Start from $\mathbf{A'}$ defined as the inverse image of $\bigoplus_p\mathbf{Q}_p/\mathbf{Z}_p$ in $\prod\mathbf{Q}_p$, with $\prod\mathbf{Z}_p$ prescribed to be a compact open subgroup (the sum being over all primes); then $\mathbf{A}=\mathbf{R}\oplus\mathbf{A}'$. This is a locally compact ring with $\mathbf{Q}$ standing as a discrete cocompact subring through the diagonal embedding (let $Q$ denote its image).

Then $\mathbf{A}$ is "residually compact". Indeed, if we pick a compact subset, then there exists an integer $n\ge 0$, a finite set of primes $I$ with complement $J$ such that this compact subset is contained in the compact subset $$K_{I,n}=[-n,n]\times\bigoplus_{p\in I}p^{-n}\mathbf{Z}_p\oplus\prod_{p\in J}\mathbf{Z}_p.$$ Define $m=\prod_{p\in I}p^n$. The intersection $Q\cap K_{I,n}$ consists of those rationals of the form $m^{-1}k$ with $k\in\mathbf{Z}$ with real absolute value $|m^{-1}k|\le n$. So if we define $\phi$ as the topological group automorphism which the identity on $\mathbf{A}'$ and multiplies the real component by, say, $2mn$, then $\phi(Q)\cap K_{I,n}=\{0\}$. So $\mathbf{A}$ is "residually compact".

On the other hand, $\mathbf{A}$ has no residually finite lattice. Indeed, let $R$ be a lattice. The image of $R$ in $\bigoplus\mathbf{Q}_p/\mathbf{Z}_p$ has finite index, and since the latter group has no proper finite index subgroup, it is all of $\bigoplus\mathbf{Q}_p/\mathbf{Z}_p\simeq\mathbf{Q}/\mathbf{Z}$. The kernel of this projection is $R_1=R\cap (\mathbf{R}\oplus\prod\mathbf{Z}_p)$ and is a cocompact lattice in the open subgroup $\mathbf{R}\oplus\prod\mathbf{Z}_p$, which is torsion-free and compactly generated. In particular $R_1\cap\prod\mathbf{Z}_p$ is trivial and the projection of $R_1$ in $\mathbf{R}$ is injective and its image is a cocompact lattice in $\mathbf{R}$ (discreteness follows from compactness of $\prod\mathbf{Z}_p$). So $R_1$ is an infinite cyclic group. Now let us show that $R$ is divisible by any $p$ (this will imply that $R$ is not residually finite). Let $x\in R$. Then since $R/R_1$ is divisible, we can write $x=py+z$ with $z\in R_1$ and $y\in R$. Now let $M$ be the inverse image in $R$ of the subgroup of order $p$ of $R/R_1$. Then $M$ is torsion-free and contains $R_1$ with index $p$. Hence every element of $R_1$ has a $p$-root in $M$, hence in $R$. So $z=pz'$ with $z'\in R$, thus $x\in pR$. Thus $pR=R$ and $R$ is divisible, hence not residually finite (and actually, necessarily is isomorphic to $\mathbf{Q}$).