Does FreeBSD, NetBSD, or OpenBSD have an encryption feature like Linux's dm-crypt? And will it work for a system partition?
Indeed, as jdeBP says, this is documented in the handbook:
gbde is mentioned first,
geli is generally more recommended. The installer actually will even help you set this up, there's a prompt for it.
OpenBSD has softraid(4), which allows you to use an encrypting discipline on a block device. Setting up disk encryption is not supported by the installer (as of September 2020), but can be configured by hand during an operating system installation. OpenBSD FAQ has a section dedicated to Full Disk Encryption which can be used as a reference for setting up disk or partition encryption.