If you want to extrapolate that one more layer, coffee is often made very hot which kills most anything that could be harmful.
Discussion
But keeping the coffee beans in your house would be the problem
Valid, but I think thats beyond the scope of the question. In all fairness, most coffee is brewed really hot too. Whether the method meets heat exposure times would be variable. RIP home coldbrew drinkers, I guess 😅