Here I see allowMidiAutomation, but no mention of MIDI in the rest of the example.
yeah, the example is all about plugin parameters, MIDI is a different concept. But it's listed here:
https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#setcustomautomation
It basically replicates the enableMidiLearn property of the UI component but for the automation slot.