I'm not a genius but it seems pretty trivial to take the input from a microphone and pipe it to the output of a speaker, the hardest part probably is the device drivers for the airpods (or any bluetooth ear buds for that matter). It looks like others have already done this in hardware [0] for $84.99 on amazon.com. There is also "Sound Amplifier" app for Apple iPhone [1] that amplifies the surrounding voice near the phone.
It sounds like they also do multiband compression (hearing protection) and multiband transparency/cancelling mixing (adaptive mode) on top of applying EQ (audiogram support) and things like accelerometer and wideband tracking for spatial audio.
There's quite a bit of processing going on on-device.
It’s really not that simple. AirPods settings where you can tune audio for vocal range, balanced tone, brightness or your audiogram - which does much more fine tuning to the sounds you hear than just amplification.