I know personally a good number of people who transitioned from EE to software. I don't know of a single person who did the opposite.
A good middle ground if you're a student is to study EE and focus on software within the degree. You won't get as many advanced CS courses but you'll be a competent programmer with perhaps a better feel for how the hardware works.
One other thing, firmware (low-level 'software' typically running on an FPGA or the like) is almost always written by EEs in my experience. That's interesting stuff, I've had to do a bit of it myself (I'm an EE).