I'm going to keep this short, since I haven't played in 3 months:
Removing HTML is overkill. The UI rendering solution you use in game already supports dynamically updating HTML without having to rewrite the entire content. See data binding in: https://coherent-labs.com/Documentation/cpp-gt/df/dfb/_h_t_m_l_data_binding.html
If you're worried about performance, this will be more efficient than your new Lua solution. You should make use of the technology you have already licensed and use instead of reinventing the wheel. More advanced UIs could be generated with the use of JS on top of this.