Is there a way to restoring a hacked Switch back to stock?

I would first try to inject a hekate payload and check if autoRCM is active.
If so, You should disable it.
From the hekate bootloader I would check the fuses and try to launch ‘Stock(SysNand)’.

If the Switch boots up in original firmware I would recommend to stay offline with the Switch to avoid a possible ban.