> Is that possible?
It's not something I've tried.
> Also is it possible to run PHP functions instead of node js?
No, only js and ts is supported.
> Also are the existing endpoint domains static?
Yes
> Can I add CNAMEs to my own domains to "mask" them?
I don't think so.