This is the best answer. MKV is just a container. It’s the codec that will matter the most. As mentioned H264 is going to be the most ubiquitous. Even if you were to try to do MP4 it’s still dependent on the codec. You could do an MKV with MPEG Layer 2, but that’s starting to become too old as well. Also for H264, the RF plays a big part too. Go for something higher like 22-24. It’ll make for a slightly larger file, but you’ll great quality without being a raw file size. Too low and you’ll end up with a potato.
As for audio, also stick with a safe codec like MP3. Using WAV is too large, AAC is limited as are some others as well.