No royalties would be owed on an interactive app that is not sold to end users, like in the cases you described.
You have become a licensee of Epic by signing the EULA and taking at least one month subscription; your client could do the same very cheaply.
I understand your concerns about your client selling the app later, but I hope you can appreciate Epic’s concerns too - we need to be paid royalties on apps that are sold to end users which use the engine and can’t have a loophole for apps that were made-for-hire. In those cases, either the developer or the party selling the app needs to be responsible for paying royalties.