This was the warning to the Israelites about the people who lived in the promised land. The Israelites were told if they did the same things you listed, that they would also be invaded. God is just.
As for techs getting info from these people...America being called the Great Satan is not by chance.
Yeah, the lesson applies. God’s judgement on us may not be the same as Issrael’s, but the passage certainly explains God’s position on such activities.
And that’s not the only passage. There are several. There is one that says God will set his face against anyone consulting a medium. That’s a very serious warning with serious consequences.