A script could loop through the html files, and read each file as a html string. If there are enough id's and classnames in the html, you can get all the data from the html using regex and strpos, usernames, topics and posts as arrays, make those unique and place in the right order. Then create sql inserts from them and write them as sql files. Its not hard. Just a lot of work and some luck as to how workable the html is.
The html export from HTTrack Website Copier places all html in one folder. The files are named using the SEF urls of the forum, which gives a lot of info already: 'u'+userid for user pages, and 't'+topicid+'p'+pagenumber for topic pages, and 'f'+forumid, and 'c'+categoryid. Getting the hyrarchy of the forums/categories could be a pickle, but if there is a forum-select-dropdown on any of the pages, you can read that to get all the parents and the order.