This is an incorrect approach. You are essentially mangling the data to suit one specific application's idiosyncrasies. This is considered https://wiki.openstreetmap.org/wiki/Tagging_for_the_renderer and shouldn't be done. The application itself needs to be fixed to address this deficiency rather than the underlying data.