I don't think you are that far off on your question at all. In fact there are some very good Apps (for Apple devices anyways) that do EXACTLY what you are talking about. I used them all the time and in fact typically will not buy or listen to a Headphone or IEM that does not have a digital compensation curve for it. The two I use is
Accudio and
Audessey. They are full music players that include DSP compensation as you original question posits.
They both take detailed measurements of IEM and headphones (and in some cases speakers) and create compensation files. Accudio shows before and after graphs so that you can see how close to "flat" a particular IEM or headphone can get. They rate the DSP compensated result on a scale from 1 to 5 in .5 increments. I find anything from about a 3.5 up is pretty good (depending on how it gets its grade). They strive for a flat response based on a diffuse curve. I happen to think they have picked curve that really works well and the compensated sounds seems just about right. If you don't think its perfect - it also includes a five band equalizer of sorts that you can use to modify the standard compensation curve - as well as simulation modes tat in theory can make one set of cans or IEMs sound like some of the best IEM in the industry (though I have some doubts as to how close they actually get). they also allow you to play FLAC files it your hearing is good enough to tell the difference - I can not so it not worth the storage space to me.
Audessey is more of a black box. They do not show before or after graphs or results of their compensation technology. Some of DSP compensations they have come up with are really amazing and sounds flat and spot on to me. Other times it seems like they add in extra bass because that's what they figure someone who buys a particular set of cans wants. They do not have a ranking for how well the compensated result comes out or how close to flat it is (again flat does not always seem to be their goal). But for some sets, Audessey does a really good job on IEM or cans that the Accudio app does not offer curves for (i.e. Harman Kardon CL and BT and the UE 500 IEM are amazing as are the Sony EX58v).
When I have a choice - I tend to default to the Accudio app since they sound more "right to me", though some times it's really close in terms of tuning between the two. Other times, the extra bass in Audessey hurts clarity a bit (but they also have a bass and treble control to fine tune their curves as well).
Audessey charges for each compensation curve now, Accudio does not - you get them all when you buy the app. They both add new IEMs and cans on a regular basis.
These two apps are why I stick to Apple Phones and DAPs to listen to music since they are not available on Android or Windows platforms (they I know of ). I find I much prefer an accurate and subjectively flat frequency response curve when I listen to music. These Apps can take good IEMs and Cans and make them extraordinary IMHO.
As always your mileage may vary...
Hope this helps and good luck!