You don't join two companies as a permanent employee. Join one and run freelance contracts in your spare time. This is basic, every single software developer that is experienced enough knows it.
Is it immoral to get a second job as a software developer? No it's only immortal if you don't die no matter what happens. Getting a second job as a software developer is called "overwork". Good for beating inflation and creating a second source of capital for your trading career though.
Yep. I've always been a freelancer and almost always worked for more than one client at a time. As long as you are able to hit deadlines nobody cares when or how you work; there's no 9 to 5 with freelancing so maybe you should figure out how to switch to that.
Edit: Ooops thought the OP wrote immortal. No it's not immoral to get a second job as long as you can handle it. Nobody ever said there is a limit on how many jobs one is allowed to take.
You seem reluctant to ask your client. Is there any paperwork or an NDA? If your client is regulated in some fashion it could require their approval. Really dependent on the character of any paperwork. No paperwork and they can show you the door if they don't like it.
Just the choice of word "immoral" is illogical. Either it's legal or not. If you signed an NDA that says you can't, well .. answered. If you didn't sign such document, then you're clear provided you put in your time and effort for your primary employer.
It's not as simple as looking at a non-disclosure agreement. Companies may have policies, and if an employee violates a policy, the employee can be fired. When I did full-time software development for a large bank, they allowed employees to have second jobs but insisted the second job be in a non-financial industry and not be at a customer or supplier for my division. Once I certified my second programming job met those requirements, it was ok for me to have two jobs.
Well the standard response from the companies upon hearing an employee is having a second job is summary execution (by firing). I know a few guys that were laid off unceremoniously because of this so best approach is to keep quiet.
Again, it depends what your employment contract says and where you live. California is an "at will" state and theoretically an employer can fire you...at will, although in reality it's more complicated, as a highly litigious state with lots of labor lawyers at your disposal to fight for you in court.