There are restrictions on who can use franking credits. Those who cannot must simply declare as income the cash dividend amount they receive. . The restrictions are designed to prevent the trading of franking credits between different taxpayers. An eligible shareholder is one who either
Owns the shares for a continuous period of 45 days or more (not counting purchase and sale days); or 90 days in the case of certain preference shares. This is the "holding period rule". Shares must be "at risk" for the necessary period, i.e. not with an offsetting derivatives position for instance.
Has total franking credits for the tax year of less than $5000 (the "small shareholder exemption") and has not arranged to pass-on the benefits to someone else (the "related payments rule").
Thus franking credits are not available to short-term traders, only to longer term holders, but with small holders exempted provided it's for their own benefit.
The small shareholder exemption is not a "first $5000", but rather once the $5000 threshold is passed the rule is inoperative and all one's shares are under the holding period rule.
For the holding period rule, parcels of shares bought and sold at different times are reckoned on a "first in, last out" basis. Each sale is taken to be of the most recently purchased shares. This prevents a taxpayer buying just before a dividend, selling just after, and asserting it was older shares sold (to try to fulfill the holding period).
This "first in, last out" reckoning may be contrasted with capital gains tax. For capital gains the shareholder can nominate what parcel was sold from among those bought at different times.