The -S option to install is one possibility. It still has a window of failed transactions for any server programs that are spun up on connection, because it explicitly rmdirs and unlinks before the rename, but it's a lot smaller one.
#NetBSD has an -r flag.
#Illumos, AIX's installbsd, and Linux-derived operating systems with GNU coreutils do not have this feature at all.
#FreeBSD derivatives, such as #DragonFlyBSD, have -S, too.
As has #OpenBSD where it's always on.