Edit small portion of a compressed video without losing quality
For tasks like this I like the TMPGEnc tools, try Smart Renderer https://tmpgenc.pegasys-inc.com/en/product/tmsr5.html.

With these tools you can cut &amp; join files, only re-encoding where the cuts / joins are. I would split the file in 3, preferably on key frames, re-render the edited section as needed, then re-join the files. There are trial versions of the products, just download it and see if it does what you need.

I don't know of a way to do this in the Adobe products - if anyone else does, let us know! Or possibly there are other free tools to perform this task, I've just always used the TMPGEnc tools for this type of work.