I found a solution:
Insert text by typing:
John Doe\t
Delay 1.5 seconds
Insert text by typing:
\n
I will play around with the delay to see how short I can make it. This will allow me to fill the to line, which is what I needed.
Will it always be the same group of people or do you want to be able to select several names at will? Can you be a bit more explicit about what you are trying to do? That might help.
Groups created in Contacts can be used as a launching point for sending messages with CardHop. I share that as a last resort just because it's additional paid software (US $20), though there is a free trial available if you get near that decision.
I tried this a bit and cannot get it to work on Big Sur. I even tried installing the imessage-ruby package in brew ¹ but it does not reliably send messages to more than one contact, and hasn’t been updated in several years, so I think the chances of it working with Big Sur are slim-to-none.
I cannot even figure out how to enter multiple recipients in Messages. Once you enter one person to send it to, the insertion point jumps down to the message area.
As far as Cardhop goes… I can figure out how to send a group email with Cardhop, but Contacts.app has the same ability. If Cardhop can start a group iMessage/SMS, it was not obvious how.
Unfortunately right now I don’t think this is possible on macOS. Ironically it would probably be easy on iOS using Shortcuts.
Drop Messages on the Applescript Editor in Big Sur, and see if it has an AppleScript dictionary. I think I've read that Apple removed all AppleScript support from it, and that explains why the Keyboard Maestro action doesn't work anymore.
It probably means CardHop won't work with Messages either – at least beyond the url-scheme.
There is an AppleScript dictionary for Messages.app in Big Sur, but unfortunately I don’t know enough about AppleScript to understand what it is offering.
There are both “Standard Suite” and “Messages Suite” available.
FWIW, I did a work-around in a similar way that has been reliable for me. I'm doing it all by manually reproducing the steps that I would be doing myself in messages to start a new thread.
Even though I already had a group name for this text thread, I have to use each of their names so that it resolves to the correct contact.
I think the trick, for me, was doing a slight pause between pasting the name and the Return keystroke. Even when I had the delays in between at .2 seconds, it was not working reliably.
Messages does then find the last thread with the three of us, so I'm not starting new conversations in the messages list.
Because this is replicating a manual process, I don't know how this would scale to 10 people!