I recently replaced the motherboard, wifi card, and switch on my Dell XPS12. Now when powered up, it will shut down on its own within a few minutes. What to check / replace next?

Check the fan. Overheating can cause your problem.

I've run into a few techs (mostly new) that thought the heatsink compound is optional. Or try to get by with what remained. It certainly does sound like a heat issue given the story.

Adding more with edit:
Just last month a machine would start up and shut down within minutes. It was none of the above but a low battery condition. Had to leave it off for 10+ minutes to get more of a charge. One of those duh moments.