There are, as the link to stackoverflow given by JohnC_21 shows, many possible document converters out there.
From what I can tell, though, and I am not pushing the Libre Office option as "the best" one, it has gotten better at these sorts of conversions. Although this one is going "the opposite direction" it's a command line processing of an RTF file converting it to PDF. https://listarchives.libreoffice.org/global/users/msg14695.html
I agree that it would be far better were RTF not needed, period, and unless the system already exists that accepts only RTF files I definitely would not go that route. Plain text is more reliably extracted and far more easily processed with Linux/Unix commands like sed and awk to get the bits you want from it. RTF is mostly used when "pretty to the human eye" formatting is required, and if the RTFs are never destined to be used by humans then I'd dump 'em.
Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1809, Build 17763
Presenting the willfully ignorant with facts is the very definition of casting pearls before swine.
~ Brian Vogel