I'm looking for a way to allow Google Assistant's speech-to-text to send a message while phone is locked, preferably only to certain contacts and without being able to read past messages.
I've googled and all solutions seem no longer valid.
Yes you can, by using smartlock.
It should be located under security and lock screen.
Click on smart lock then voice match and turn on: Access with voice match And lock screen personal results.
However this may let you read earlier messages and will not restrain it to only selected contacts