Great explanation Marco! A JPA Buddy Maven/Gradle plugin or API would be great that can generate the Entities, DTOs, mappings given a database sql, not even necessarily connected to an actual db (db may not have been created yet or doing test first development using test containers).
Ktor as in building HTTP APIs? With Ktor you are probably going to use Exposed as an ORM, not Hibernate, so JPABuddy won't help. If using Hibernate/Spring Data however, sure.