Whilst I am not well versed in Scipy, or how the firwin2 function works that you have quoted, this is a very complicated problem that you propose, and there is a lot more to think about than you may realise.
There is one very important component of how sound is radiated by a loudspeaker that is quite often overlooked (especially in marketing specifications for loudspeakers). Directivity. You state that your loudspeaker has a particularly poor response below 1 kHz. I assume that means a “non-linear” response on-axis. What about off-axis? This off-axis energy is what interacts with your room, i.e. reflections, and the frequency response in these off-axis directions most likely have a response different to your perfect on-axis response. If you correct just the on-axis loudspeaker response what has that inverse filtering done to the other positions off-axis? Will you always listen, with one ear, at the intersection of your loudspeaker on-axis directions?
Some loudspeaker manufacturers do actually use technology that attempts to apply “correction” (Genelec, Bose etc…) to overcome room anomalies and positional errors in loudspeaker placement. Whilst the methods employed are very smart, we have to remember that these are just best approximations. It is also not uncommon to use some form of linear phase FIR filters to correct for minimum-phase anomalies in loudspeaker response for mid-high frequencies, and alternative approaches can be applied for lower frequencies. Some of these techniques can be better understood by reading text such as: Immersive Audio Signal Processing
Other things to consider: Just how much time data do you window in creating your corrective filter? And where should you make your measurement? Will you always listen in that position? What I’m emphasising here is that temporal and spatial variation of the soundfield need to be considered also.
So what you are attempting to do isn’t exactly “doomed to failure”, it’s just very complicated, and at the end of the day, the desired result is going to be that which suits your subjective tastes. I hope that some of the questions I have raised have been helpful, I have raised them simply to remind you that it’s not as simple as inverting a single omnidirectional measurement of a loudspeaker at some point in a room… Otherwise, yes, every loudspeaker manufacturer would have already done this. Good luck on your endeavour!
I’ll leave a random selection of some references to technical literature related to research in this topic space that you may find helpful:
Combined Quasi-Anechoic and In-Room Equalization of Loudspeaker Responses
Invertibility of a room impulse response
Equalization of loudspeaker response using balanced model truncation
Equalization in an acoustic reverberant environment: robustness results