If you suspect php problems, can you seek out and post any errors php is giving you?
php-fpm does logging a bit differently and you should have a /var/log/php-fpm dir. When you problem hits, check for recently updated files in that dir, and tail, and post. If you're lucky, it'll had something there.
If you don't see something there, you can try turning up the logging in php.ini.
php 7.4 does fatal a couple of previously-deprecateds. If l-NMS isn't updated for those yet (i.e. expects 7.3), they will blow up scripts. And if you want it to work, you'll have to tweak those bits of code yourself.
php isn't quite Python insanity for new versions, but it isn't as easy as (almost never break-backwards) perl.