How to display plain html
Once again, the problem sat in front of the screen ;)

Like @rooby said, there was a mistake in the html returned. A missing &lt;/table&gt; tag messed up my layout. Adjusting this solved my problem. Thanks!!

But to be able to influence the layout of custom html a bit more generally, I did this:

When a module returns output without first passing it through a theme function, it ends up in page['content']['system_main']['main']['#markup'], whereas in a normal page, there would be no #markup on this level of the page array, only elements like node, pager, #block etc. So finding page['content']['system_main']['main']['#markup'] means some custom code has been returned by some custom module.

So in my theme's template.php, I implemented 

function mytheme_preprocess_page(&amp;$variables, $hook) {
    if ( $variables['page']['content']['system_main']['main']['#markup'] ){
        $variables['page']['content']['system_main']['main']['#markup'] = '&lt;div class="customcontent"&gt;' . $variables['page']['content']['system_main']['main']['#markup'] . '&lt;/div&gt;';
 }
}


Thank you guys very much! Always awesome how good the feedback in the drupal community is.