Thats an idea, you can create a 503 error page in the CMS, its in the dropdown list.
You wouldn't be able to put th custom PHP in the generated doc, but I think you could put something like:
Redirect 503 /e/503 "assets/error-503.html"
I will give that a try and post back. (Knowing my luck, it wont work :) )
Mo