I'm also in the planning stages of re-writing ~1M lines of C doing hardware control for a telecoms system. It's going to be replaced with Elixir (basically Erlang) because it's the perfect fit (which is unsurprising given its a telecom system).
My prediction is that it will be 10-20k lines of code when I'm done because there's so much obsolete cruft to remove. Plus ~1k of C as a shim layer to allow an incremental transition.