Pi-hole as a package processing middleman?

I'm a software engineer, and I noticed that in-browser adblocking methods work much better. Is it possible to use pi-hole as a middle-man with some sort of html / package processing to remove ad elements post receiving it from the network? All of this would just be on-top of the pi-hole base function as an addon.

Where did you observe this? "much better" is strong phrasing.

Admittedly, Pi-hole cannot always remove the ads when hosted from the same server as the content, however, it seems to be able to do this in almost any other case (which is much more common out there).

It cannot act as man-in-the-middle and it was intentionally designed to not be able to do this. However, you are free to install a proxy of your own chosing on the same RPi next to Pi-hole. You can then get the filtering of both combined, however, the configuration of a proxy may be a bit more complicated and not as universal as the Pi-hole DNS server. The only solution to get this for all clients is to attach a second network adapter and use the Pi-hole as a router. Be aware of maybe slowing down your network speed if you have a fast upstream connection.

Pi-hole and browser extensions cover different areas.

A browser extension can specifically block anything URL related, like images or scripts or other resources, but it will only ever see the traffic that your browser generates.

Pi-hole is a filtering DNS forwarder.
As such, it is able to block any DNS query on your network, i.e. from your browser and also OS telemetry, ads shown by apps, IoT devices phoning home etc.

No.
Pi-hole handles DNS traffic, and DNS doesn't concern itself with URLs.
You might want to read a bit more about the Domain Name System,