Hopefully not RCS, but maybe Matrix or the Signal protocol, as RCS is entirely controlled by Google and there aren’t any FOSS clients.
Specification may be not controlled by Google, but the single available client implementation is controlled by Google and almost all carriers are delegating managing their RCS servers to Google.
While XMPP or Matrix server you can host even on your LAN network between two computers.