There is already a FOSS stack exchange clone: https://codidact.org/
SE's DB schema is public (https://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede/2678#2678), and SE content is CC-by-SA 4.0 with database dumps regularly posted to archive.org: (https://archive.org/details/stackexchange).
All that is to say: there is a lot of groundwork done and the SE data could be ported over...