I am pretty sure that the only thing 18.0.1 solved was the issue that the screen would completely lock up if you touched the area near the camera control button.
My "defective" 16 Pro Max has lag in the keyboard even if it is flat on a table and I only touch the screen with my index finger. So it is surely not an issue of palm rejection in that case.
I always thought it was a software issue but after my experience with the replacement, which is 100% flawless on exactly the same software version as my laggy 16 Pro Max makes me think that the hardware must be related somehow.
If it is a defect that can be solved with software update or not is unknown. It could be related to different panel manufacturers and that only one of them is properly tuned. If that is the case, then it could be solved.
My current best guess is that it is hardware. I believe the lag is caused by early production issues with the display panel. But again, it is just my guess. In any case, there are 16 Pro (Max) out there with absolutely zero issues and if I had a laggy unit I would replace it until I got a good one.
Just want to know one more thing, does the new phone miss touch input when pressing multiple times quickly? As you mentioned about it not being laggy!