So your approach seems sound, but just be cautious about how frequently that file has to be checked. The install-lock is no longer checked for on every page load for these reasons.
I've had a wee look, and there may be some ways of optimising this to minimise I/O.
In an ideal world, I would make it so that at the earliest point possible in the app initialisation, I could do a single check for the lock file and if it's found, remove every event listener and class extension belonging to this modification from the current request. In other words, the listeners and extensions would obviously still exist in the DB, but it would be as if the mod was disabled in the AdminCP prior to the update.
You might think to yourself that disabling the mod during upgrades is a good idea anyway, and you'd be right, but I'm trying to idiot proof my addons as much as possible here
The best solution I can come up with at the moment is to create a utility class that will check whether the lock exists once, then cache the result for the remainder of the request. That way, if the addon has 50 listeners and extensions that's called in any given request, there's only 1 file exists check, not 50.
EDIT: Also, what might be a good idea is for me to add support for a new config flag, something like
$config['dbtechDisableLock']
for advanced users if they experience I/O errors or slow-down with their setup.
Fillip