Hi @felmue!
Good news! I got this working using the most ridiculous solution. My 220KiB test firmware would write in about 105 seconds, so approximately 2KiB/sec. I enabled mod_ratelimit on Apache and gave a 2KiB/sec rate limit to my firmware directory.
<IfModule ratelimit_module>
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 2
</IfModule>
Now the firmware gets written at roughly the same rate at which it downloads, keeping the TCP session active the whole time, instead of the "burst then die while idle" connection behavior from before.
Thank you for all your help!