http://www.ti.com/product/TPS65982 is an example of a fairly high-integration IC. Its 5USD/ea in bulk, and you still need some other supporting IC's around it, such as - I kid you not - a flash chip to hold its program code. Take a good hard look at section 9.3.4 of that manual to get a taste for how complex this gets.
They only have very reduced schematics published, but it looks like the RPi4 isn't deploying a PD solution at all. I think they are just relying on the analog signaling of Type-C. The power supply is just a "simple" type-c 5V/3A unit.