Hey Terwilf, editing levels of old games is indeed an interesting use of Tiled! Regarding implementing such export functionality natively, see the Tiled manual about implementing custom export formats. I'd recommend using JavaScript, since Python is not supported everywhere and has some compatibility issues and C++ plugins are even trickier in terms of compatibility.
The only downside of using JavaScript in your case is that the Windows XP build ships with a somewhat outdated version of the JS engine, which currently makes it impossible to write a custom importer. It should hopefully be functional enough to write an exporter though.
Please feel free to let me know about your exporter if you write one, maybe it would be nice to link it from the tiled-extensions repository.