Apples USB-C charging bricks are quite capable on their own. The new 140W brick uses a 32-bit Arm Cortex-M0 STM32G0-series microcontroller with 36K RAM, 128K flash ROM, running at 64MHz.
USB PD is a fairly complex protocol. I can safely plug my phone into my MacBook charger now because both ends can negotiate a suitable power level. We’re not just doing 5V 1A anymore. The CPU they chose is probably a little overkill, but it’s nicer than 8-bit microcontrollers to write programs for since it’s just Arm.
Who knows, maybe they have a bunch of internal sensors and can intelligently react to high temperatures or moisture.