I haven't seen anyone posted such MODs, both ideas are good and probably doable (I'm not sure though about the monitoring the size of the .zip, not sure if it's even possible) [UPDATE]yes, it's possible with approximate results[/UPDATE].
[EDIT]
Here is a little modification that would skip images in the lightbox zip that would not fit into allocated memory per script.
download attached file, extract it and upload memory.php file into includes/ folder.
In download.php find:
require(ROOT_PATH.'includes/sessions.php');
Insert below:
include(ROOT_PATH.'includes/memory.php');
Then find:
if (!$file_data = @file_get_contents($file_path)) {
Insert above:
if (!check_memory(@filesize($file_path)*2)) continue; //we need twice as much memory as the filesize