As they say, that depends. More precisely, it depends on whether original_db_name() returns something you can trust.
That is, if users are logging in from an application and have that database in the connection string it will work, at least sort of. (And assuming that the application does not work in that database.)
But if you have users that connect to the server to run ad-hoc statements through SSMS, the chances for success are smaller. Blenda may have master as her default database, and she does not specify the database when she connects, but she is content with switching to the database when she has connected. (And maybe she's moving around among the databases.) Thus, Blenda will run without the cap. (And surely if she discovers that things run faster if she takes the roundabout way, she will do that.)
So I would say that in the general cases, this will not work, but some confined cases it may.