Remember, the Telegram bot will never be able to write to the user, if he himself did not activate this bot before.
So. Your idea can be implemented as follows. The user enters the bot and is offered a choice (two buttons). The first button is "connect with a random user", and the second is "connect by id".
The first option: you accept a message from that user and duplicate it to another (and vice versa).
The second option: if the user enters the correct id of another user, he receives a notification about a successful connection, and then everything is the same as in the first option. If the id is incorrect - an error message.
For navigation I would use InlineKeyboard (or alternatively ReplyKeyboard). It turns out that the bot will be an intermediary between users.
Disadvantages for users: you (an outsider) will be able to save all correspondence and view them. View complete information about the user's account.
Benefits for users: They will be completely anonymous to each other.
I could say more about this, but I don't quite understand the point of creating a bot for such things