I grant that Debian is not great at webapps. OTOH giving an application write access to itself is inherently risky. It's too bad shared webhosting and its limitations has so warped the PHP application community.
An alternative model: web app has r-x on the app files, and an app specific admin user has rwx to run the check and update script on a regular basis.