How do I prevent keyboard shortcuts being synced from my iPhone to my Mac? I use some keyboard shortcuts on my iPhone. This helps a lot, e.g. when typing gn which is replaced by Good night!. These shortcuts are synchronised to my Mac via iCloud.  On my Mac I use TextExpander as a sophisticated keyboard shortcut tool and don’t need these iOS shortcuts, as I have hundreds of Mac abbreviations and don’t need shortcuts that work on a phone but not elsewhere.

The answer to my question is pretty obvious: All I have to do is to unable System Preferences → iCloud → Documents &amp; Data. However, a lot of apps rely on this setting being enabled. 

What else can I do to prevent the synchronization/use of these abbreviations on my Mac?
You have answered your own question, the syncing is included with lots of other things and granular settings are not available.  The only way around it is to use just text expander on both iOS and OSX, or just the default text substitution tools, but not a mix.  Sorry!