when I set up social.pinkro.se for the first time I kinda did that
I messed something up with the initial setup so I completely wiped the database without keeping the instance authorized fetch keys and then recreated a new instance in place
a bunch of pleroma instances refused to federate after that, it took a bunch of fiddling around with the database on both ends to get it work again
so theoretically if you back up your keys and everything and restore them properly it could be fine
practically it's easier to just start fresh on a different domain