The investor so far has also been very neutral and I think will remain so.
Assuming you weren't, it's very strange to force someone out right before their equity vests.
Basically, your lawyer can understand the situation better than an internet message board can. Then, a phone call from your lawyer to your co-founder could help make your co-founder become a lot more reasonable.
If the business-minded folk don't fully value the tech solution I can easily see this happening. This "devil's advocate" hypothetical is not an unheard of occurrence.
If this is the case, (and we don't know the details,) it means that the other founder was acting in bad faith. Hopefully the threat of a lawsuit is enough to solve the situation.
If you can afford it, find a good lawyer.
Otherwise I would expect them to be (i) interested in ensuring the underlying tech was maintainable in future, which if nothing else might result in more reasonable earnout possibilities for you and (ii) concerned that one of the founders apparently wishes to cut others out of the business to turn it into his personal cash cow, particularly if the other founder is the one with monetisation ideas.
It's not guaranteed that the investor is your friend (another possibility is that replacing you and taking the business in a different direction is something they quietly encouraged) but I wouldn't expect them to be 'neutral' on whether the business has a chance of generating them a return or not.
Similarly, business people don’t take shit like this seriously until lawyers are involved. They see no evidence of your ability to actually hold them to account and so believe they can just push you around.
Hiring a professional who knows how to actually hold the other side legally accountable, or make them hurt (tens of thousands of bucks in lawyer fees and months down the drain if the case goes to court) shows you mean business.
Otherwise it’s just talk.
A lawyer is also an expert and can give expert advice, both strategic (what should we do?) and tactical (how do we do it?) based on knowledge and experience. Exactly the same way you do in your technical domain. Would you want advice from a non-engineer on how to architect or build something? What database to use? No.
Like developers, lawyers cost money for a reason, and it’s because of the value they can bring.