It is known (and not complicated to prove) that for a finitely generated not virtually nilpotent group $G$, we can pass to a quotient $G/N$ of $G$, such that the quotient is just not virtually nilpotent, i.e. it is not virtually nilpotent, but every proper quotient of it is.
Does a similar argument holds in the broader realm of locally compact groups? that is,
Does any compactly generated locally compact non nilpotent-by-compact group $G$ have a non nilpotent-by-compact quotient $G/N$ such that any proper quotient of $G/N$ is nilpotent-by-compact?
One may assume some relaxing conditions, for example that $G$ is a real connected Lie group.