@noon That would probably require ES to be modified to either catch a SIGTERM signal and perform its normal shutdown procedures, or could have it check for the existence of a trigger file to shut down. Either of which are not very difficult to implement.
Perhaps you can post this suggestion in the Ideas and Development section of the forum.