I don't think APFS was designed or tuned with HDDs in mind, but it will work just fine. Especially for backups where random read/write performance is not important.
(If I could create an encrypted external HFS+ volume, I would but macOS hasn't allowed that for a while as far as my experience goes - it's non-encrypted HFS+ or encrypted APFS.)
[0] https://support.apple.com/en-gb/guide/security/seca6147599e/...