Hello,
Thank you for posting here.
Q: My question is if I use this process with I have problems with duplicate SPNs or any other things, because I am reusing the old name on a new machine.
A: Yes, we can do as you described.
In our case, we can try the rename ad DC according to the following article.
Rename a Domain Controller Using Netdom
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc816601(v=ws.10)?redirectedfrom=MSDN
But because we need to reuse the old name on a new machine. We can see the message from the above link.
We also need to update the FRS or DFS replication member object according to the following link.
Update the FRS or DFS Replication Member Object
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc794759%28v%3dws.10%29