I stumbled upon streamripper which is a command line tool to do what the tool name says. And apparently there’s a docker container available to play around: https://hub.docker.com/r/clue/streamripper
The container in its current shape is not exactly fit for the purpose of recording the streams on a a predefined schedule. But you can start it with supplied parameters (streamripper command line params), and as a result you get the file saved to your location. So in a way it does the job, but you need to automate container management (start time, etc) for that purpose.
I may explore the idea of creating a more flexible container using streamripper once I have more time.
Out of curiosity. If someone is accessing self hosted services only from certain locations where ip addresses are known, is it a good idea to whitelist those ips in firewall and block external access for the rest?