P.S. Replication on PostgreSql 11.1 (with default settings) worked fine with inserting 4.5 million rows. The xid - * - lsn - * - *. Snap files were smaller and larger in size. But if there were several inserts in a row of 4.5 million lines, an error appeared: ERROR: out of memory.
Could you provide a test case? Are you using subtransactions? logical_decoding_work_mem [1] was added in v13 to ameliorate some high memory usage while decoding transactions. It is weird that it does not 'out of memory' in v11 too (v11 introduced Generational memory allocator to reduce logical decoding memory usage); I expect a high memory usage in v10 in a big transaction scenario.
If you are looking for a workaround, you should try to disable all subscriptions and then enable only one at a time.