The royalty is collected per product/application/game basis. How your infrastructure is implemented (ie. deployed instances) to support what would be considered ‘the product’ is most likely left up to you. So, the boundary/granularity is at the product/application/game/SKU level. Consult your attorney.
Epic seems willing to work with people to be successful wrt to licensing:
As you’re a student, if this is a not for profit academic use, there is a license for that as well:
Whatever it is, if you’re making money with software margins, writing that 5% check every three months won’t seem so bad.