Usually, TOC is shown just below the page title or first section of the converted HTLML document.
However, when markdown is converted into HTML file, it's position in upper section decreases readability and it's hard to find specific topics in the document.
When TOC is presented on the left side of HTML document, it would be much better like outline plugin function in Joplin
This is possible in Stackedit.io with exporting as 'Styled HTML with TOC'.
Sorry, I am pretty new to Joplin, thus there might be easier/automated ways to do this but so far I did not dive into the details...
You can do that by adding/changing the CSS of the exported files. Easiest might be to have an extra CSS file and just load that in the header of each HTML file.
Content of the CSS would be something like the following lines. This is as simple as it can be and can be adjusted easily to fit needs/size constrains/style feelings/...
If it should apply to all documents one can add it to the userstyle.css as mentioned in the Manual. Just know that in both of these cases the preview of the document inside of Joplin is affected as well! Havin the TOC on the side of the document might be not ideal in the preview as it can consume a lot of space.