Random restarts can be triggered by multiple reasons..
- software related.
- hardware related
first step is to pull the AP support file post reboot to see the reason for reboot so that we are aware about the logical next step
so as you said "B) this problem happens only if the switch configuration PoE LLDP-MED is enabled!
(on a HP switch 2530-24G-PoE+)"
do you see no random reboots with new version of code with PoE LLDP-MED is disabled ??