So I've been assisting hubert with analysis of this on IRC, and what we have found so far suggests:
1. the max_worker_processes thing is a red herring
2. It is virtually certain that the restart, in addition to changing max_worker_processes on the master, also changed the master's setting of track_commit_timestamp from off to on (which is clearly relevant to the issue)
…
I did notice that 9.5.15 does have a fix for an issue in this area, but I didn't see any more recent changes - did I miss anything?
We've hit similar issue last week, but on 11.5 — we had track_commit_timestamp enabled on master after switchover, replica failed to start.