Though the trouble with such hardware solutions is that a good setting or limit on the line-output of a DAC/amp. for one pair of headphones or speakers could be too high for another.
I may have mentioned it before, but I would prefer having each speaker/headphone equipped with a calibrated fuse or circuit breaker to remove any possibility of hearing damage, even during abnormal operation or in the case of a surge or short circuit.
With the increasing popularity of wireless headphones/speakers—and forced transition away from analogue TRS/TRRS connectors—many consumer devices will already need complex ICs to handle the incoming digital signal—be it via Bluetooth, Lightning, or USB—as well as a DAC. According to @MazeFrame in a thread about DACs and amplifiers, few consumer devices (if any) use digitally controlled amplifiers to adjust volume. Therefore most devices are adjusting volume by sacrificing bit depth—“taking the axe to the bits”—of the digital signal that is fed to the DAC.
For such devices, it seems entirely possible to add circuitry—or more likely: software—to achieve safe volume limiting within the headphones/speakers’ ICs. A software solution here (within the ICs of the headphones/speakers themselves) could be more reliable than in the audio source device’s OS.
While I would prefer an analogue fuse-like solution, this IC method would still be an improvement.
A final point regarding @MazeFrame’s trust in potentiometers
While a potentiometer is clearly electrically simpler than digitally decreasing the volume of a bitstream, it could have its own issues: do potentiometers reliably fail safe?
A Small Upside to Non-TRRS Headphones on iOS
I have not looked very exhaustively on Android, but on iOS devices, I know there is a dB-measured volume limiting feature located at:
Settings > Sounds > Headphone Safety > Reduce Loud Sounds
Before this current incarnation of the feature, the Music app had an option to simply limit iOS volume to a percentage of its full range. Instead of this, the current Reduce Loud Sounds feature allows a volume limit to be set to between 75 dB and 100 dB.
For unknown audio devices, iOS probably has a default mapping of volume output levels to dB.
However, for certain devices, iOS appears to use information from the Lightning connexion to precisely map its volume to a dB rating. You can see evidence of this in Control Centre’s “Hearing” control; it uses this information to show the moment-to-moment dB rating of what is currently being played under a digital volume meter.