Infinite scroll evolved alongside algorithms that incentivise addictive content. So it’s “good” UX in that it’s effective for consuming addictive content…
When I’m trying to do something constructive, like search or browse, infinite scroll is IMHO disastrously bad. You can’t keep your place in the list, or jump ahead/back.
So you'd rather something like Slack was paginated? I think that would be disastrously bad.
On the contrary, pagination makes it impossible to keep your place in the list if it changes between page loads.