html2text does not seem a great help in converting HTML to DokuWiki because it's too good at formatting the text to retain the flavor of the HTML. For example, if a heading has attribute align="center", html2text pads on the left with spaces to center the text. Since DokuWiki uses indents as mark-up, indented headings are not properly rendered.
Have you looked at the Perl module HTML::WikiConverter at CPAN? This seems more promising to me. Though there's not yet a DokuWiki dialect, tweaking the existing MediaWiki dialect (Perl module MediaWiki.pm) would seem more straightforward than hacking the C++ code of html2text. I may play with this a little myself, but I'm hardly familiar at all with the MediaWiki and DokuWiki mark-ups and I don't claim to be an expert with Perl. I have asked the author of WikiConverter about any plans for a DokuWiki dialect, but I have not yet received an answer. Any prospects for work on this at your end?