It's an example of Moravec's paradox, in which something that seems intuitive, simple, and utterly effortless to us turns out to be massively difficult to do in software. In this case, it's a matter of raw processing power and Moore's law eventually catching up to the dynamic range of human vision, but there are sporadic deep learning attempts to tackle it.
https://gizmodo.com/this-amazing-camera-can-capture-both-the...
The size of sensors is decreasing, and currently you can recreate the performance of that 2012 tech with a sensor about 20% its size but about the same price.
The problem with cameras is this:
You need more sensors crammed into smaller space (megapixels) with higher resolution of the range of frequencies each sensor captures (dynamic range,) and/or a higher rate of sampling per sensor to improve the quality of images (framerate.)
The chips used are already running at maximum speed, so the size of a sensor is constrained by how many pixels can be processed at framerates expected by consumers, usually 30 to 60 fps for video.
You can adjust the dynamic range using physical color filters in the lenses, removing all infrared for example. Then the sensors will only trigger on visible light, and you can tweak the sensors to bethere are other tricks used to optimize what's being captured. The issue is sensitivity - the number of photons hitting a sensor required to activate it. Darker colors reflect fewer photons, so lighter colors "overwhelm" the sensors. Even multiple samples can't overcome some of the limitations, among which is certain conditions in which black skin shows up weirdly in video and images (to the perennial frustration of digital photographers, and a frequent topic of complaint amongst pornographers.)
https://www.ovt.com/sensors/OV9716
This latest high end sensor has between 18-20 bits of dynamic range, or 120db resolution. This is getting close to human performance, and if the world doesn't fall apart in the next ten years, there will be human equivalent hdr cameras on phones, and there won't be a camera problem for darker skinned people anymore.
In the meantime, if your camera can save photos in .raw format, it's the unprocessed output from the sensor itself. You can process the raw pictures with desktop applications like photoshop to correct the colors, and turn those sunset photos of your wife into memories instead of disappointments.
https://en.wikipedia.org/wiki/Raw_image_format
There's a whole slew of tutorials and applications for correcting issues with skin tones and different lighting conditions. There's a bit of a learning curve, but something most people can accomplish in an afternoon.