First; I am gobsmacked that Safari doesn't support 4k content yet.
The solution proposed by @ww is a good option. The HTML player will downshift quality automatically if there is not enough bandwidth.
However, if you do nothing this will also happen if your Internet circuit experiences congestion. If you are not experiencing congestion then you will be able to experience 4k - which I would have thought would have been a plus for your use case.