My understanding is that ExecCGI is the command that can enable or disable the running of a CGI.
In the code below it looks like the apache directive is allowng the enabling of CGI apps in the root of the public_html folder.
So my question is, should ExecCGI be removed from the public_html folder or have I missed something, perhaps this is required for PHP to be run?
ScriptAlias /cgi-bin/ /home/example/cgi-bin/
DirectoryIndex index.php index.htm index.html
<Directory /home/example/public_html>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
    Require all granted
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/example/cgi-bin>
    Require all granted
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on