Definitely lawyer up, that would be a first thing. Then, if you want to regain control about he company, consider CEO your enemy, not the CTO. Invent a reason and fire the CTO, if you can do it. Then, step up as CTO yourself, or at least hire a person you trust. Then, hire COO, CFO, CMO. Make sure those are people that are loyal to you and where each one will take over one of the CEO responsibilities. At the latest stage, let those people document every mistake of CEO, and you try to push him out together with C team and investors.
That's exactly what he is doing to you. He convinced you to voluntarily step out from CTO position and hired his tool. Now, your chances to fight back are much worse from this position, but the war is not yet over.
So, lawyer up, read Machiavelli, know your enemy and fight fire with fire. Remember, the CEO that did this to you is not your friend anymore, and deserves whatever you do to him.
45% share of 100M$ worth company is still much more than 10% share of 200M$ worth company or 1M$ compensation. You are not fighting to optimize for the company success, you are fighting to optimize your own wealth. If the company gets destroyed, and you still manage to get more then what would be your compensation package, you are still better off then retreating. Why caring about the company that doesn't benefit you, you would certainly not enjoy the success of the company that squeezed you out.
So yes, lawyer up and fight if it's worth to you to fight for the control. Don't be emotional about he company and business. It's your weakness, and they are already playing on that.
If he wanted to start with a less-experienced technical person, and jettison them early on -- he could have hired an employee and paid them.
Instead he co-founded with you, as a partner. He was happy to take your money -- you have skin in the game. He doesn't get to shoo you out the door now like a temp.
He also doesn't get to do it via the CTO. He owes you a frank conversation. Also you need a lawyer.
tl;dr: From hearing your side of the story, although the CTO is handling this like a tool, the CEO is the biggest schmuck.