Democrats have swept the first major elections of Donald Trump's second term, with the US president saying the ongoing government shutdown is a "big factor".