error 500 when D8 site placed in maintenance
BEGINNER VERSION

Maintenance mode is working in general. Use the following direction of debugging: FROM "untouched" Drupal TO your state.


Download a same core version of Drupal as you have. Turn on maintenance mode (without changing anything else), visit the page with a non-admin user. 
Apply the settings in your link about (Drupal 8 maintenance page theming ) visit again the page with a non-admin user.


Whenever the site brakes you know where the problem resides. 

ADVANCED VERSION

500 errors are always logged in Drupal. Check what says the "recent log messages" with admin. 
Also you can set in your settings.php

$config['system.logging']['error_level'] = 'verbose';


This won't just show 500 error, but also tell the reason.