It was indeed intended to prevent populism; the idea is that instead of voting for the president you vote for a group of people who you trust to then choose a president. But it has never in practice worked that way.
https://www.washingtonpost.com/nation/2019/08/22/he-tried-st...
I'm a supporter of NPV. I don't think it's likely to be a problem, although this feels like something that will shake out a lot further in the federal courts.