Hoe makkelijk is het om de Discourse community later naar een custom webapp te porten?

That would largely be a data migration like any other.

The tables are pretty self-explanatory?

Or you could just do everything via the API and build your own front end, keeping the Discourse database structure and back end …