Surely there must be some other way to check if the user is running sudo for the first time. Googling the file name as is, specificially ".sudo_as_admin_successful" will show the entire first page being devoted to removing the file. It is clear that many users find the file annoying and cluttering. Not to mention that it does not follow linux filesystem and XDG folder conventions.
Alternatively, default to not enabling the flag that creates the file