What you could do, and I know this is hackish, but you could call "hooksecurefunc(C_MountJournal, 'Pickup', function(index) print(index, GetCursorInfo()) end)" and just store the number from GetCursorInfo() in a table as the key and the mount journal index (or spellID, or whatever you want) as the value, and just cross-reference that table for your button.
Lua Code:
local MountID2JournalID = {}
hooksecurefunc(C_MountJournal, 'Pickup', function(journalID)
local _, mountID = GetCursorInfo() -- might want to confirm this is actually holding a mount spell
MountID2JournalID[mountID] = journalID
end)
This probably won't work when moving from an existing action button though.
You'd probably have to keep track of what every action slot contains, so if PickupAction is called you can figure out what spellID the mount is based on what was in that slot.