Is there a component so when a topic is marked as Solved, the topic gets locked and a custom message is posted with it?

Not sure but either of these two might be able to accomplish your needs

And (this is another collection of automations)

2 Likes