I'd start by having the PCM (powertrain control module) checked out, as well
as the electronics in the transmission itself.
If you're asking for a "do-it-yourself" solution, I don't think there are
many left. It sure sounds like an electronic gremlin to me.
Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here.
All logos and trade names are the property of their respective owners.