Yeah, it's possible, but you have to create the template in the backoffice first... by that I mean that the DocType needs to be associated with the template.
So if that means doing it manually in the backoffice, or hacking the db directly 🤷 After that the original Razor file can be moved to the RCL.