It's really hard to put a finger on who is in the wrong, because both the former intern(FI) and CEO screwed up.
Out of so many things to build that could be fun, it's wrong to build something that you worked on, where a really good engineer/founder took you under their wings, taught you a ton. To take that and open source the secret sauce of a fragile startup in a competitive market... that's wrong. To publicly show confidential emails without warning - raises eyebrows. And if he is blocking out that much text, then this leads me to conclude he is downplaying their hardwork and innovation.
However, it's wrong to threaten a young budding programmer with money and lawyers and brag about how we are not small anymore, and we have money now(20 million), which is not a lot in my opinion. They haven't built a moat yet.
I really think all of this could have been avoided if the CEO took a more sequential and slower approach.
1. Ask the former intern to take it down nicely. If he says no, then you could ask him to close source certain parts of the program, and drop a backlink to Replit. The CEO could have taken a softer approach - you only take out the big stick when absolutely necessary.
2. He should have gotten on the call after the former intern asked him THREE times pleading to talk to him. I don't think it's right to treat a former starry eyed programmer who respects you like that - to outright ghost him... You spent 3 months mentoring the young grasshopper. I didn't like the way he treated that intern, and let the problem fester. That's not right.
To me the right move is for CEO to be the bigger man, apologize, and try to make it right with OP. That's my assessment, but there could be more to the story...
I would also like to note that this is why you NEVER impulsively write emails late at night when you're brain is tired and judgement a little compromised after a LONG day.