OBS does that itself. File -> Remux Recordings
It doesn't change the formatting at all. It's still h.264 video with aac audio, or whatever you've set it for, just in a different bucket with a different file extension. It's more to satisfy a stupid format checker than anything else, but if that's what it takes to make it work somewhere, then that's what it takes. And because it's not actually changing anything - just a bit-for-bit copy - it goes pretty fast, limited by the hard drive transfer rate, not the CPU.
The reason to record in MKV has nothing to do with the actual format, but the header structure that surrounds it. MP4 video is kinda like WAV audio in that the header can't be finished until the data is finished, so if the recording is interrupted without allowing it to tidy up, the header is bad and you can't access the data very well. MKV's headers work differently, and don't need to be "fixed up" after the recording finishes. Interrupt that, and the data is still easily accessible.