Let $G$ be a locally finite, connected, and infinite graph. Let $\Omega(G)$ its set of ends. Let $|G|$ be the Freudenthal compactification of $G$. Let $P_{\Omega}$ be a partition of $\Omega(G)$. Consider the partition $P_{|G|}$ of $|G|$ defined as follows. $P_{|G|}$ is the partition of singletons on $|G|\setminus\Omega$ and $P_{|G|}$ agrees with $P_{\Omega}$ on $\Omega$ . Then $P_{|G|}$ induces an equivalence relation $\sim$ on $|G|$. Consider the quotient space $|G|/\sim$. It is compact because it's the quotient of a compact space. It adds elements of $P_{\Omega}$ as points at infinity to $G$ instead of elements of $\Omega$ as points at infinity .
Has this kind of construction been considered with ends in topological spaces?