- Apply time pressure
One way to handle this is to give them quests that explicitly have timelines. If they go resource harvesting, they lose the quest.
This is similar to what you described with the demon attack but somewhat different. At least as I understand your description, you used a living world and the players suffered consequences for not being around. That is fine and good, but it doesn’t directly apply time pressure. It wasn’t a situation where the players knew explicitly that if they chose to go harvesting resources that there would be direct and clear consequences.
If you give them a specific quest with a clear timeline, then they have they have to make the choice of which to do.
- Make most resource gathering a downtime activity
I’m reading between the lines a lot, but it sounds like your players are spending a lot of in-game time harvesting these resources.
I would tell the players that now that their characters are familiar with the process of harvesting those specific resources that they can just do it as a downtime activity. They can, whenever they choose to invest the time, spend X days to acquire Y amount of the crafting resources.
Of course, the ratio of X to Y should be much worse than adventuring time would be. While the occasional prospector gets rich by literally striking gold, the laborers doing the mining tend not to be well paid compared to the fabulous wealth an adventurer can pursue.
In fact, if the players already have reasonable wealth, you can point out that it might be a better use of their time to hire people to handle the tedious process of gathering the resources now that they have staked a claim in an area and they can just sit back and receive the resources on a regular basis without it impacting their adventuring.
- Open the conversation by telling the player’s that this part is getting tedious for you and impacting your fun.
I think in this particular case you can avoid a direct discussion if you want to. You can nudge things by applying time pressure, making most resource gathering a downtime activity, and having a lot of common crafting components available on the market.
But if that doesn’t work, it is fine to directly tell the players that this particular part of the game is getting tedious for you. Everyone should be having fun at least most of the time, and if something is getting too tedious for someone then its time to address revisions.
You can then directly discuss options for how you want to change it.