UserX has following grants:
CREATE ROLE \"UserX\" LOGIN PASSWORD \'pass\'; CREATE DATABASE \"DBX\" WITH OWNER=\"UserX\" ENCODING=\'UTF8\' TABLESPACE
You are trying to restore a dump from a v10 database into an older version of PostgreSQL (CREATE SEQUENCE ... AS is new in v10).
CREATE SEQUENCE ... AS
That is not supported and won't work. You can create an SQL script with pg_restore and edit it manually. Or upgrade the destination database.
pg_restore