Kafka connect has its own set of configurations to programmatically create topics, without relying upon the broker to auto-create new topics.
Is there something similar for the producer (java) API?
Producer? No, apart from auto-create capability - when actually producer requests a metadata of a topic that does not exist, and that caused the backend to create a topic with default configuration (if enabled). Similar with consumers (fun fact: they can be configured not to create topics even if auto-creation is enabled).
If you want to have finer control, you'd need Kafka Admin instance.