Need advice - drive train or electronic control unit issue (2004 Corolla)

My 2004 1.6 Corolla auto-transmission clocks 320,000KM. I have been experiencing the following problems for the last few months:

(i) from a "cold start", the transmission does not engage immediately, whether in D or R - Rev. it up and after a delay of say 3 seconds (on occasions, much longer), it engages with a "thunk" and surges forward/backward. By "cold start" I mean first start of the day, or start after a rest period (engine off) of say 15mins. Once the car gets going, there're no such problems. Warming up the engine does not help.

There are also some other intermittent sounds, which may or may not be related to the transmission issue:
(ii) "clicking" sounds (much like relay contacts opening/closing)

and/or "tik-tok" sounds (quite like cow bells of drum sets) both emanating from under the dash, sometimes concurrently.

(iii) the engine warning light has come "on" on some occasions, and cleared by itself without any intervention.

The Toyota service team has opined that its is a gear-box issue; However, if it is, then why does the transmission operate normally after the initial hesitancy - could it be an electronic control unit issue, or others? I have just returned from a 1,000KM road trip without any other untoward incidences (apart from the aforementioned problems)

Any thoughts - thanks.