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

I think you’ll need a plugin.

The reason there’s a delay is that sometimes people realize it’s not solved or someone else has another comment.

Have you had problems because topics are not locked?