Currently, as I understand it, screen recordings are saved only in .webm format. My main use case for this functionality is creating demos that can be viewed directly on GitHub, which requires MP4 format. Would it be possible to add an option to save recordings as .mp4 instead of .webm?
MP4 is used automatically if you have one of the supported gstreamer H264 encoders installed. If your hardware supports VA-API, that would be vah264lpenc or vah264enc from gst-plugins-bad or openh264enc as software encoder from gst-plugins-bad as well. What the exact package containing these encoders is, depends on your distro.