Probably not the answer you want, but you're not going to need to worry about updates to Server.app. This because Server.app support for the Apache web server, SMTP, IMAP and various other services is being deprecated.
Which means it's probably better to figure out what network server configuration and software you're going to replace it with, and sort out how to configure PHP in that environment. Whether the replacement network services will be running on macOS or some other platform, for instance.
As for alternate versions of PHP? Some related reading, and some more related reading...
I'd be very careful not to expose that PHP to anything other than your local app or to your web app. Don't expose the updated PHP to other parts of Server.app, as that can sometimes get things badly tangled.
You're quite right, too. Years ago, I had a different version of PHP installed for the particular web application, and it was a hassle. Upgrades did tend to cause problems. And exposing the updated version of PHP to the server definitely cratered some of the network services.