I logged into appleid.apple.com from a Mac to create an AppleID for my wife including all the personal, security, and credit card info. When you set it up using the web app, it doesn't change any settings in your iPhone or iPad (or on your Mac). On my wife's iPhone, I went into Settings/Messaging/Send&Receive. It will show the current AppleID being used. Touch the > and it shows the current AppleID on the top line. Tap it, and a box pops up: Tap "Sign Out". Then type the new AppleID on the top line with its password on the second line, then touch "Sign in". That's it after it all syncs up in a minute or two. After making the change our iMessages were completely separated on both sending and receiving. And nothing else was changed on her iPhone. It's still using my AppleID and all the apps and shared iCloud data are still there like before.
As a bonus, my wife and I were now able to use Messaging on our iPads without getting each other's messages. It works really well: everything is synced between my iPhone and iPad and I can alternate devices on a single thread without losing anything.
Our adult daughter who has always had her own AppleID notified me of the problem when she upgraded to iOS12: my wife's and my iMessages were combined in a single thread which also made it impossible for her to send iMessages to us individually. Once we made the iMessaging change on my wife's iPhone and iPad, it fixed all the problems on our daughter's devices. She didn't have to make any changes on her end. So this "fix" solves that problem.
I know that there are many reports of iMessages just being re-routed incorrectly in situations where there is no sharing of AppleIDs. I think that's just an iOS 12 bug and not something that can be fixed by changing settings like this.
It was not acceptable to my wife and I to switch to Family Sharing because we enjoy sharing common calendars, contacts, reminders, and notes which becomes very difficult or impossible to do. We don't have secrets after more than 50 years together <g>.