Okay, you know what, I will let whatever engine the person is using to get and draw the outlines. It is taking way too long to figure out all the combinations possible to try and bake outlines on the tileset as empty blocks with just the outline.
A possbile solution is: Every level is a different layer, one iterate through each column of tiles and draw outlines for sides that aren’t connected with anything else. To further optimize this I believe it is worthwhile do draw these lines during loading and make it a temporary texture with the same Z index as the lowest Z value on that layer instead of doing all these draw calls while rendering the game.