Thank you for the reply.
I noticed that zend.max_allowed_stack_size wasn’t defined at all in my php.ini so effectively “no limit” as you mentioned. After setting a limit the error doesn’t seem to be popping up anymore, thank you for your advice!
Additional question, I might’ve maybe missed it while looking through your guides and documentations, but do you have any tips/advice on what to have enabled/what limits set in php.ini (aswell as modsec conf), for Wordfence to function smoothly?