Yes all of those would be way better options than Python and probably PHP. Well maybe not C++. You'd have to be pretty crazy to have web developers writing security sensitive code in C++.
The "blame our co-founder for the choice" bit is exactly what that graph about the cost of defects vs how early they are fixed is talking about.
If they had just picked Go or Java right at the start they wouldn't have had to expend all this engineering effort to get to a still-not-very-good solution.
Serverless is too overloaded a term to have any meaning. I'm not really seeing how Python or PHP "scales infinitely" in any way that C#, Java, C++ couldn't.
PHP is usually easier to scale because it just a matter of how many webservers. e.g. apache or nginx, you choose to deploy.
This also possible with other platforms, but can be a bit trickier to get right.
For large PHP setups it is usually the number of database connections that is the limiting factor, however that is why historically the replicated MySQL databases was such a good fit for PHP, thus only creating a limit for writes on the master.
> For large PHP setups it is usually the number of database connections that is the limiting factor,
For pretty much every modern programming language, IO is the bottleneck over everything else.
To save you some time, there are practically no metrics in which I think PHP beats another programming language other than maturity, and even then, not really.
Yet YouTube, Instagram, Pinterest, Reddit, Robinhood, DoorDash, and Lyft backend were originally primarily written in Python. What’s funny is that nobody can really deny Python is slow yet somehow the biggest websites in the world were written in it. More proof that Worse Is Better?