Can I interact with Signal programmatically?You can! There are a couple maintained libraries I know of, one in rust the other in go. Signal doesn't exactly like you doing this, but can't stop you.
github.com/whisperfish/presage
github.com/mautrix/signal/tree/main/pkg/signalmeow
I don't have any knowledge on the spam side besides guesses.