There are three aspect to this that I think bear talking about separately.
a. Your relationship with your team members
b. Your relationship with you boss/company
c. What the end effect is for the customer/client
Let's actually go in reverse.
c. Without talking about your feelings or how it effects you. How is this effecting your customers and clients(and by extension the profitability to your company)? I can't quantify this but I would recommend that you take some time to try and quantify this from your perspective. This will be helpful when you go to your boss with why this is a problem which leads to...
b. It sounds like your company and your boss are happy with you and your work. Going to your boss with 'I feel' statements is dangerous. While your situation is complex and your frustrations are understandable it's also something that can seem like a 'Babu is complaining' instead of 'This is an actionable issue'. These problems seem like a true disaster waiting to happen, depending on the relationship(who leads the project? which company is the 'contractor' in this situation and which is the 'in house' company?) this is something that could potentially damage your company's relationship with your client. I would approach your boss again but this time I would come with direct, actionable issues. If the other team refuses to meet on something - that's actionable. If the other team is holding you to a higher level of accountability then they hold themselves - that's actionable. Come to your boss with both the problem and potential solutions. Your supervisor cannot change how anyone feels, but they can set expectations for a working environment that could mitigate many of these issues.
a. This sounds mean but... get over your uncomfortable-ness with the other team. When a member of a team gets fired, it is understandable that they would close ranks. They certainly weren't told by their company why he was fired and they are potentially his friends/peers which means he has probably said some things about why he thinks he was fired(which is probably totally at odds with reality). If my coworker was fired, even for a logical reason and perhaps especially for work-related reason(ie not producing, poor quality output, etc), it would be a pucker moment for me as it would be for most people. Many of their responses, closing ranks, higher scrutiny outside their group, attempting to discredit the person who was part in getting this coworker fired, is natural(if unpleasant) in that light. So how do you deal with it?
Their requests for more formal methods of communication is actually beneficial to you and I would embrace it whole heartedly. When you have a question or need a conversation email it. That way there is proof of a time-line when you made the request(in case they don't fulfill it) as well as the methods and professionalism it was made with.
Additionally I would recommend pushing for a formalization of the 'contracts' between your teams. What is expected of you and your company. What is expected from them and their company? What do you guarantee to deliver to them, what do they guarantee to deliver to you? These things aren't meant to divide teams(internal teams in my org have similar formal 'contracts') rather they are meant to solidify everyone's expectations("Didn't support enough" isn't a helpful response. "Didn't meet the expectation blah" is something actionable.) Ultimately these 'contracts'(to clarify I mean contracts in a non legal sense but in a expectation setting sense) foster trust between the teams because everyone knows what is expected of them and what they can expect from others.
Speaking of teams... In theory you are all on the same team because you are all working on the same product but in their eyes you are now on separate, potentially competing, teams. Don't expect them to have your back and treat them as you would an external but necessary team. The caveat to this is directly in response to "If I take any attempt to learn more about their work they ask why are you interested etc." Because the answer to that is "We are all on the same team, by understanding how you do things I can make all of our lives easier" When it comes to communicating with them and their company "We are all on the same team" is absolutely the attitude you should take.
It can be truly frustrating to have others use a magnifying glasses on our mistakes and flaws(or even disagreements on implementations of specific ideas). But this is another thing you can embrace. If you are professional and keeping your boss in the loop about the situation AND demand the same high level of performance from them that they are demanding from you then you should embrace the opportunity to defend and improve your ideas. The trick is to also expect if from them. If they have an issue with something you have done discuss it without ego. Whatever the decision uphold it and push that same expectation forward.
Finally. I think it's important that you take a bit of blame for what happened with Sam. Not out loud, not to other people, but internalize it a bit. You mention what Sam did but you don't mention what you did. Did you bring this lack of support, buggy code and issues to your supervisors early in the process. Early enough that something could have been changed? Not doing this is a failing on your part. A much, MUCH lessor failing that "wrote buggy code and didn't support it properly" but still something that you should keep in mind for the future. When a team member fails it is often a failing of the whole team to some degree, and you were part of that team.