If $T: X\rightarrow Y$ is an isometry between banach spaces we have the following:
$T(\overline{A})=\overline{T(A)}$
Indeed, if $y\in \overline{T(A)}$, we obtain a sequence $T(a_n)\rightarrow y$, where $a_n\in A$. However $(T(a_n))_{n\in \mathbb{N}}$ being Cauchy implies (because T is an isometry) that $(a_n)_{n\in \mathbb{N}}$ is Cauchy. Thus $a_n\rightarrow x\in \overline{A}$. Because $X$ and $Y$ are Banach and $T$ is continuous its graph must be closed and we therefore need $T(x)=y$. But $x\in \overline{A}$, which means $y\in T(\overline{A})$.
For the other direction, take $y\in T(\overline{A})$. We have $y=T(a)$ where $a_n\rightarrow a\in \overline{A}$ and $a_n$ is a sequence in $A$. Because $T$ is continuous $T(a_n)\rightarrow T(a)$ and this implies (because $T(a_n)\in T(A)$) that $y=T(a)\in \overline{T(A)}$.
With this fact established, we can prove the following:
If $T:X\rightarrow Y$ is an isometry between Banach spaces and $X$ is infinite dimensional, $T$ cannot be compact.
If $T$ were compact, we would have $\overline{T(B_X)}=T(\overline{B_X})$ being compact. Because $T^{-1}: T(X)\rightarrow X$ is continuous map with the subspace topology (indeed $\lVert T^{-1}(x)\rVert=\lVert x \rVert$), then $T^{-1}T(\overline{B_X})=\overline{B_X}$ should be compact as it is the image of a compact set by a continuous function. But $\overline{B_X}=\{x: \|x\|\leq 1\}$ is compact only in finite dimensional spaces.