I know this question is considered basic and has been asked millions of times, but I have done my research and there are some points that I just can't understand.
For an American call, many resources say that it's possible to early exercise right before a dividend if the dividend is worth more than the remaining time value. But if you exercise the call before the dividend and acquire the stock to capture the dividend, then right after the dividend payment, the stock price will drop by the exact amount of the dividend payment and your overall payoff will still be $S_t - K$ where $S_t$ is the stock price right before the dividend payment. So from my understanding it will still be better to sell the call option before the dividend payment as the payoff is $S_t - K$ plus the time value. Does it mean that this argument is invalid?
Many say that if an American put is deep-in-the-money, it might be optimal to early exercise even in absence of dividend. What confuses me is that in any case where you decide to early exercise, your payoff will only be the intrinsic value, will it not always be better to sell the put option directly?