Seems like importing Markdown files into WordPress would be key. I see there is a plugin that claims to do that.
From the Discourse side, I’d use a Data Explorer query that looks something like:
select title, p.user_id, p.created_at, raw
from posts p
join topics t on t.id = topic_id
where post_number = 1
This gets the first post in each topic. You might need to limit it to a different subset.
Alternatively you could get the cooked
post which is HTML. On second thought that might be easier to import into WordPress.
Another option might be to use the API to grab the posts.