How to practically correct for group delay imposed by a digital filter (Python)
A causal filter such as what must be used in real time filters will always have group delay. Because it is unavoidable in such a circumstance it’s beneficial to know what it is.
Group delay cannot be corrected for in real time, as it would require knowledge about signal which hasn’t happened yet.  Variable group delay can be made constant by applying a filter with a phase response such that the sum of the applied filter and the incident filter is linear, but this will result in a constant, almost certainly non-zero and positive group delay.
In rendered applications, a method such as filtfilt will apply the filter, then flip the filter about zero time and apply it again, which will square the magnitude responds and result in no phase shift. There should not be anything about this process that results in stability problems.
Hypothetically, one could construct a zero phase version of a filter in a rendered application by way of some maths. One way would be to take the frequency transform of the resulting signal and subtract the phase response of the filter, and transform it back to the time domain.  This might have some gnarly edge artifacts.  You might try creating an all pass filter with the negative of the filter’s phase response, use that to filter the signal.  That would result in a signal that’s delayed by half the filter length, which you could remove manually. However, it sounds like you are using an IIR filter, so picking an appropriate length for prototyping the all pass might be tricky.