How Do You Make And 301 Redirect A Firebase Dynamic Links?

In episode 230 of Semantic Mastery's weekly Hump Day Hangouts, one participant asked how to make and 301 redirect a Firebase Dynamic Links.
The exact question was:
Hey SM crew!
Since April 2019 started, Big G is starting to turn off the Goo.gl shortener – of course, the links will be still redirected, but you won't be able to create any more new links.
My question: I don't only understand how to create a Firebase Dynamic Link (it's damn complicated!), but also not how to make a 301 out of them.
How do you manage that?
Thanks,
Fabian
