Installing Craft 3 - Internal server error
I have had a similar issue when using MAMP on OSX. The "solution" was to switch MAMP to use Module mode (all hosts use the same PHP version) rather than FastCGI mode (where you can run different PHP versions per host).

I have no clue why, but switching it allows the installation to complete. I am then able to switch it back to Fast CGI mode and everything works (although the issue sometimes occurs when installing/updating plugins).