A former Oracle engineer says AI and layoffs have raised the stakes for H-1B visa holders. Here's how he's adapting.