The reason IIR filters are a poor choice is because for all cases except a minimum phase system, the IIR filter will be unstable. Unless we can be assured that the channel is minimum phase, the IIR solution directly as the inverse of the impulse response will not work. This point is explained in more detail in this related post which details this further.
This is because only a minimum phase system has all poles and zeros inside the unit circle on the z plane (and it is required that all poles be inside the unit circle for a causal system to be stable, just as in continuous time using the s plane, all poles need to be in the left half plane). When you invert a system, the poles become zeros and the zeros become poles, so only a causal minimum phase system has a stable causal inverse.
The other choices are linear phase, maximum phase or mixed phase- and for all those cases, which are causal and stable, they will have zeros outside the unit circle. Thus if they were to be inverted, the zeros become poles and would be therefore unstable.
A very simple example is to compare the following impulse response given as coefficients: [1, 0.5], and [0.5, 1]. The associated z transforms for each of these two cases (from which we can determine the poles and zeros) are $H_1(z)= 1+0.5z^{-1}$ and $H_2(z)=0.5+z^{-1}$. The first case $H_1(z)$ is minimum phase, specifically proven by confirming all of its poles and zeroes are inside the unit circle:
$$H_1(z) = 1+0.5z^{-1} = \frac{z+0.5}{z}$$
Pole at $z=0$ and zero at $z=-.5$ Stable! π
Since all poles are inside the unit circle, it is a stable causal system. It's inverse also has all of its poles and zeros inside the unit circle:
$$H_1^{-1}(z) = \frac{z}{z+0.5}$$
Pole at $z=-0.5$, zero at $z=0$. Stable! π
The second case as the reverse filter (coefficients are reversed) will have the exact same magnitude response but in this case is a maximum phase filter (all zeros outside the unit circle) so will not have a stable causal inverse.
$$H_2(z) = 0.5+z^{-1} = \frac{0.5z+1}{z}$$
pole at $z=0$ and zero at $z=2$ Stable! π
$$H_2^{-1}(z) = \frac{z}{0.5z+1}$$
pole at $z=2$ and zero at $z=0$ NOT STABLE! π
For this reason, if we wanted to pursue a true inverse filter to equalize a channel, we must remove the maximum possible delay (while still being causal) from the estimated channel response first. If the poles and zeros of the channel response are known, then creating the all-pass response is done by simply reflecting the zeros outside the unit circle to inside the unit circle ($z = 1/z_p^*$).
Why this works is clearer by first understanding how any channel response that isn't minimum phase (meaning mixed phase or maximum phase) can be decomposed into a minimum-phase system cascaded with an all-pass system. The all-pass system has a flat magnitude response over all frequencies, so only modifies the phase, thus with that we pull out the maximum possible delay from the system leaving only the minimum phase system with the given magnitude response (any magnitude response has only one minimum phase solution). An all-pass system is realized by having all poles inside the unit circle, with a complex conjugate reciprocal zero associated with each pole, such as a demonstrate below showing the poles and zeros on the z-plane for a 2nd order all-pass with a complex pole at $z=z_1$:
The decomposition for an example maximum phase system shows how reflecting any zeros outside the unit circle to inside the circle at their reciprocal locations is the minimum phase system, cascaded with an all-pass. The all pass is done such that the new zeros in the minimum phase system are cancelled by the poles in the all-pass, leaving just the zeros outside the unit circle:
The minimum phase system will have the exact same magnitude response as the maximum phase system, but unlike the maximum phase system it has the desirable property of being invertible (has a stable causal inverse).
This is detailed further in these links:
Minimum Phase - All Pass Decomposition For Large Linear Phase Filters
Get minimum phase from function
However, an alternate approach that doesnβt require reducing the channel to minimum phase is using a least squared equalizer as detailed in this post: Compensating Loudspeaker frequency response in an audio signal
Creating filters using the "frequency sampling" approach, meaning deriving the impulse response from the inverse FFT of a desired frequency response as suggested by the OP is not recommended over alternate approaches such as least squares outlined above, and firls in MATLAB, Octave and Python, and windowing approaches to filter design. This is because the inverse FFT suffers from time domain aliasing, requiring additional zero-padding which results is a much longer filter to achieve the same performance that the other approaches listed would provide. This is demonstrated in this link. The frequency sampling approach to filter design results in frequency response that has an exact match at the frequency samples chosen, but greater error everywhere else compared to the other approaches. To mention however, the case where "frequency sampling" design excels is OFDM (orthogonal frequency division multiplexing) since in that case we are only interested in discrete frequencies.

