Is generating intention necessary? Any intentional action is kamma. We do good and bad actions. Like any other actions, sometimes we do it intentionally, sometimes we just do it without intention. 

Is it necessary to generating good intention before/when doing wholesome deed? The more we do good deeds the more frequent we create this intention which can easily become an obsession of the mind and create (new) sankhara. But if there is no intention, how can a good action become a good kamma?
Mental intention is always necessary for an action. However an intention (such as Right Intention of the Noble Eightfold Path) does not always have to have 'self' or 'attachment' involved with it.
There are three kinds of kamma: (1) bad kamma; (2) good kamma; &amp; (3) void kamma.
The intrinsic meaning of 'good &amp; bad kamma' is there is attachment or 'self' invested in the action &amp; its results. To quote the scriptures:

And what is the right view with effluents (defilements), siding with merit (goodness), resulting in acquisitions (attachment)? There are
fruits &amp; results of good &amp; bad actions.
MN 117

'Void kamma' means there is no 'self' invested in the kamma.
Buddhas appear in the world for the primary purpose to teach about void kamma or ending kamma. The higher practise of Buddhism is doing necessary &amp; compassionate kamma with a void mind or 'doing without a doer' (rather than for the accumulation of good karma). It is for stopping obsession with kamma &amp; stopping creating (new) sankhara. To quote the scriptures:

And what is the cessation of kamma? This noble eightfold path — right view, right resolve, right speech, right action, right livelihood,
right effort, right mindfulness, right concentration — is the path of
practice leading to the cessation of kamma.
Nibbedhika Sutta

In summary, the enlightened view is 'ignorance' is the doer of both good (meritorious) &amp; bad (demeritorious) kamma and 'wisdom' is the doer of enlightened void selfless kamma.

Bhikkhus, if a person immersed in ignorance generates (abhisankharonti) a meritorious (good) formation (saṅkhāraṃ), consciousness fares on to the
meritorious; if he generates a demeritorious (bad) formation, consciousness fares on to the demeritorious; if he
generates an imperturbable formation, consciousness fares
on to the imperturbable. But when a bhikkhu has abandoned ignorance
and aroused true knowledge, then, with the fading away of ignorance
and the arising of true knowledge, he does not generate a meritorious
(good) formation or a demeritorious (bad)
formation or an imperturbable formation. Since he does not
generate or fashion formations, he does not cling to
anything in the world. Not clinging, he is not agitated. Not being
agitated, he personally attains Nibbāna. He understands: ‘Destroyed is
birth, the holy life has been lived, what had to be done has been
done, there is no more for this state of being.’
SN 12.51

This link may be helpful: Kamma in Buddhism