1/4tsp daily is fine. The best prevention though is a high moisture diet. Pumpkin won’t necessarily prevent all hairballs. Raw egg yolks are also great.
I have heard that some cats love it. Mine does not. But one loves pumpkin and will lick it off my fingers, and the other will eat it mixed into her food.