Am I correct that the UCC would have owned the real estate and the building that the congregation uses? Do they do that?
Immaterial. This should not have come to a civil suit. There are prohibitions in the bible against bringing this kind of matter to the civil authorities. However, as it was UCC and the losers in the vote who did that, I have no doubt that they are in the wrong, just on that score. What are they trying to do? Force people into a faith position? That never works very well.
The Congregational Christian churches clearly own their own property and assest, as there was no national body to hold anything (just a council of equals that got together occasionally). The E&R did have a national body that could hold assets, but mostly the regional synods would have had that power. The UCC Constitution clearly provides that churches have the right to withdraw and to keep their assets (unlike the Episcopal Church).
If the church that withdrew was a former Congo church, there would be no issue at all EXCEPT for the fact that the local church bylaws had a provision that if there were a split in the church, the one remaining with the UCC got the assets. That might have been a holdover from an E&R congregation's old bylaws or something new; I don't know.
This was clearly the correct decision, both as a matter of corporate law (churches are usually nonprofit corporations) and as a matter of UCC church polity. It is astonishing that the UCC hierarchy joined the lawsuit, but, then, the exceptionally left-wing leadership in Cleveland is remarkably heavy-handed and ham-fisted.
PS, given the name is “St. Peters” this was almost certainly an E&R congregation before the merger - Congregational Christian Churches were never (almost never?) named for saints, and the term “saint” was hardly ever used in a Congo church except to refer to all believers in the older literature. A Congo church would have been “First Congregation Church of X” (or 2nd or 3rd etc. or “[a place location] Congregational Church” or perhaps something like “Plymouth Church”.