Please note with backend servers you may need to write an actual backend and set it up. That is the path we have chosen, using C# and .Net. Depending on complexity, B4J might be able to handle backend functions, which avoids the need to have two programming languages.
But be warned the setup is not trivial, you need load balancers, DDOS protection, an edge connection, security for https connections and the ability to scale using something like Kubernetes or equivalent. It can get really hairy really fast. That is the trouble platforms like Firebase save you.