PostgreSQL 9.6 error: invalid resource manager ID
I have by now concluded that this is a symptom of PostgreSQL encountering malformed WALs. These error messages also seem related:

LOG: invalid record length ...
LOG: record with incorrect prev-link ...


The root cause was apparently that a call to pg_basebackup -X stream did not terminate. (This was apparently an issue titled "pg_basebackup -x stream from the standby gets stuck if there is no traffic in the database" that was resolved in PostgreSQL 9.2, but may have cropped up again.) When I had to interrupt the call with CTRL-C, this may have left malformed WALs.

I am now using pg_basebackup -c fast -X fetch instead, and this works fine. Given that and for my current purposes, it is no longer necessary to understand details around (PostgreSQL) resource managers.