The second point, a job is always transactional, you exchange labor for money and at any given time, either party can stop that transaction
Also, if you are a tech person in any major city in the US, you are more than likely making at least twice the median wage in that city. If others can survive making half of what you’re making, you should be able to save enough to weather a brief storm.
Of course I understand things are different if you are here on H1B.