I don't know much about compactification in string theory, but the idea is based on the compactification in (4+1) D Kaluza-Klein theory, proposed in the years after the theory of general relativity was published to unite gravity and electromagnetism. (The weak and strong interaction were not discovered yet.)
The idea proposed by Kaluza was to generalize the metric tensor to five dimensions to add the electromagnetic vector potential as the components of the fifth dimension.
The idea proposed by Klein was that this dimension cannot be observed because it is compactified and here we have the connection to the topological one-point or Alexandroff compactification: $\mathbb{R}$ can be mapped to $\mathbb{S}^1\setminus\{*\}$ by the stereographic projection (which is your map $j$) and then be compactified to $\mathbb{S}^1$ by adding the missing point. Spacetime is therefore not $\mathbb{R}^{1,4}$, but $\mathbb{R}^{1,3}\times\mathbb{S}^1$, the same topological space as the Anti-deSitter space $\operatorname{AdS}_5$.
The extension of this extra dimension curled up is described by another scalar field $\phi$ added to the theory and so small, that only microscopic objects can observe it. (Just like a rope looks like a one-dimensional line to us, but has a two-dimensional surface to an ant.) Electric charge for example can be described as the velocity of the particle along the curled up fifth dimension, but is far above that of light so the theory failed.
Decades later, string theory reused the idea again to compactify even more dimensions using six-dimensional Calabi-Yau manifolds to reduce the dimensions from ten to four.