You might want to go down the rabbit hole of virtualdub2 and avisynth. Virtualdub provides a GUI for very simple editing but its main focus is encoding. Avisynth allows you to work with video files with scripts. The most advanced filters for improving quality are on avisynth. You can create a .avs script in notepad and then view it in Virtualdub as if its a video file.
You can start with just Virtualdub2. Use its built in deinterlacing filters (because those DVD’s are interlaced), resize filters (because the files on a DVD aren’t the correct aspect ratio) and video/audio compression. For X264, use quality based encoding at something like Q18 for almost perfect quality.
Trek DVD’s are particularly hard because they are a mix of film source and TV special effects so you need a dynamic deinterlacer that can switch between 3:2 pulldown for film parts (live action) and straight deinterlacing for special effects (space battles).
https://en.wikipedia.org/wiki/Three-two_pull_down#:~:text=Three-two pull down (3,of%20transferring%20film%20to%20video.&text=It%20converts%2024%20frames%20per,slight%20slow%20down%20in%20speed.
Up next Sony sues Pacific Gas & Electric for profiting off of piracy. All those torrents were powered by Pacific Gas & Electric.