Try this,
The proper method for your requirement is Plugin,
Joomla have default plugin event for onUserLoginFailure
.So you have to create a User plugin for your requirement.
Also you mentioned you are customizing #__users
table Never do that bcoz its a Joomla core table Once an update available it will remove your column.
So create new table with proper user relation, you can use user_id
as key in your new table and track the failed attempt there.
You can create your custom table with part of your plugin the just an install of plugin will create the table too. So Please go for standard Joomla methods.
Refer Joomla default profile plugin for more details of plugin.
Hope it make sense..