I’ve worked in embedded software before. I wouldn’t really recommend it - there aren’t many job openings there, and you generally need a higher degree. The fact is that C code is stable, runs as intended for its useful life span (decades), and only needs to be updated once in a blue moon. How many engineers do you really think are needed to upkeep something like that? Not many. Usually just a handful of people who really just do mundane testing to make sure everything is in order.
Right now, CS is doing fantastic relative to engineering. There are more CS jobs than every other engineering field combined (I can say from personal experience that my CS offers out of college were substantially more lucrative than my engineering offers, which I had to work WAY harder to obtain). Globalization is an ever-present threat, of course, but frankly there’s nowhere you can really go to escape it. The US has it pretty good compared to anywhere else, as far as employment goes.