There is no harm in installing it. Just do it. You don’t think you have any Intel code, but you do, or else you wouldn’t be prompted to install Rosetta.
Xcode has a ton of applications and utilities in its bundle. Most are universal, which have both arm64 and x86_64 executables, but a few are still only Intel.