This is free and full of all sorts of tools for muxing/demuxing mkv and mp4, including subs:
MeGUI is the most comprehensive GUI based x264 converter. It supports also HEVC/H265 (x265), MPEG-4 ASP (XviD & libavcodec MPEG-4) using mencoder, MelEG-4 AVC (x264) using x264 CLI or mencoder
www.videohelp.com
However, it might be easier for your editing purposes to burn the subtitles into your mkv video at the ripping stage. Then when the edit is finished, you should have the option to simply swap the source file to the mkv without the subs burned in. Or just leave the subs burned in.
and this free program is great for editing and syncing subtitles in most formats (including the most prevalent *.srt format):
Subtitle Edit is a free editor for video subtitles - a subtitle editor. With SE you can easily adjust a subtitle if it is out of sync with the video and much more.
www.videohelp.com
If you're trying to extract a blu-ray subtitle file, it'll probably be a *.sup file (If I remember correctly) which is some sort of graphic file, not text like *.srt. So you might need to use Subtitle-Edit's OCR (Optical character recognition) tool to convert it. It takes a lot of time and effort to do, unless you can find a free *.srt file available somewhere.