(Replicated response from Stack Overflow per request)
Rather than replacing the files (which could be overwritten in any future update), you're probably better off writing a new plugin for Joomla that installs Tiny 5.
The source code for the (v4) TinyMCE plugin is a good place to start to write your own - replicate how this plugin works, and you'll need to extend its functionality.
Doing it this way also means you could choose to use the Cloud version of Tiny, meaning you don't need to host the files locally, and receive updates as Tiny push them live. You do need a Tiny API key for this, but IMO, I feel it is a smarter way to host Tiny given that even during 5's life in 2019, some really useful features have been deployed, and if you're hosting all the files yourself, you'll need to keep updating them as you go.
The challenge with writing your own Tiny 5 Joomla plugin is that the core TinyMCE plugin for Joomla does not make it possible to have externally hosted Tiny plugins (such as a custom one you've created). So you would need to extend both the configuration and the instantiation to be able to store external plugin configuration, pull it in to Tiny's config, and also be able to manage your toolbars.
At Joomla Day Australia 2019, I spoke about developing external plugins for Tiny 5 in Joomla 4 (video of presentation should be available online in early 2020), and have a plugin that uses the cloud version of Tiny, and allows for external plugin configuration - but this was for an alpha version of Joomla 4.
Joomla 4 will come with Tiny 5, and I did a pull request to get external plugins into the Editor config, so just waiting for Joomla 4 could be a more passive option.