IIRC it is still a hardware issue. I recall seeing the same issue on one of our organization's laptops and I believe it was a hardware issue. I know it doesn't make any sense. You can try booting into Safe Mode to see if the issue still occurs.
The easiest way to confirm a hardware issue is by installing macOS to an external drive and Option Booting the USB drive to see if the same thing happens to a clean install of macOS. You can even install macOS to a USB stick if necessary, but it will operate very slow, however, that is Ok for testing the keyboard & trackpad after log in. This is probably a good idea since then you can tell Apple or the AASP it happens with a clean install of macOS. It is entirely possible that the tech will get the keyboard & trackpad working temporarily by reseating the cable or even the battery so be prepared to go back & forth with them.
It also never hurts to try an SMC reset and PRAM reset (hold the PRAM reset for at least three chimes so it activates several times). The SMC reset can only performed using the internal laptop keyboard.