I had a quite similar issue a couple of weeks ago while tinkering on my experimenting machine: killed my root by messing up the /etc/passwd while updating.
(btw: When I want my root stick to csh, will I be asked this every update, again and again?)
Wouldn't be a problem since that machine is for experimenting throw away.
But I didn't want to give up quickly, tinkered a bit and got me my root back.
That's one of those moments to feel good about using FreeBSD:
There always is a solution.
As adorno pointed out:
physical access to the computer
is pretty much all you need.
Don't boot the machine's installed system, boot a life system on it instead (FreeBSD iso.install-image on a USB-stick will do; instead of "Install" goto "Live")
As already some mentioned above mount your partition/pool containing /etc/ writeable.
Then edit /etc/passwd, and /etc/master (/etc/group is okay, you say), add/correct the line for root.
Watch out for to get all this ..:0:0
::0:0:.. right, and the password empty.
Or - easier/better - copy the according lines from your last /etc/-backup.
This might feel be a bit "dirty", but hey, 'quick-n-dirty' is my middle name.
When your machine is up and running again with a root account you can calmly clean up,
such as give root a password again, anyway,
so all according files are correctly set by the system again.
Worked for me.