Well enterprise content filters are able to do something like this.
I don't know of any set of tools that would give you a full setup, but you would probably need to start doing the same kind of setup as a squid+squidguard content filter. You have to run it in interception mode, which means generating and distributing your own CA.
After you get all that configured, you swap out the squidguard with some magical tool that does content editing.