Okay, I do see a difference in behaviour now in sqlitebrowser: with my soci-enabled liblinphone packages installed I see entries being added to table ~/.local/share/linphone/linphone.db:chat_message_content and other tables. The timestamps in chat_message_participant also line up perfectly with the time of installation. I even downgraded again to the current bullseye packages for comparison, and with them installed nothing was added to the database when sending messages. So compiling that in certainly had some effect. And it could actually mean that a new upload of linphone-desktop can be avoided (at least for now).
I don't see the message history reappearing in the app though, but that could be because my SIP gateway doesn't relay the messages correctly. I think linphone might only show in its history messages whose reception was acknowledged by the other side. Until then they might be stored in the DB to be delivered once the other side becomes reachable again. What puzzles me a bit is that the submitter saw messages in the DB. But maybe those were from when he (presumably) used the appimage version. I'll try to get asterisk to work and see if I can find out more with that.