Oh, gosh, I’m so sorry; in my head I read that you’d already stripped/isolated peripherals down to just the keyboard and mouse. Thankfully you were smart enough to get there despite my oversight.
As for bad USB hubs and devices, they are far more common than I’d like or most would think. They are mere serial devices, different from old serial in the most basic sense in that they are powered (in part) via the host bus.
A hub (or devices) can inject all kinds of noise into a host or companion(s) on the same bus; so I’m not in the least surprised (other than it being a Tripp Lite brand).
That said, don’t be so quick to condemn the hub itself:
— you don’t explicitly state so, but I presume you stripped the hub of even its unused Lightning cable, yes? They have micro controllers that I’ve first hand seen cause a kernel panic each and every time it was attached to a lesser quality host.
— the power supply itself would typically be more suspect than the hub, especially typical “wall wart” (always-on) style adapters, as opposed to an actual switching power supply (goes to very low power when not in use; also often providing power filtering). Power adapters of both kinds can go bad, and provide “dirty” power injection if the hub doesn’t have proper filtering (either AC or DC).
If you can, find another power supply of the proper voltage/connector (be certain to test for polarity!!) with which to test.
— Did you perhaps change your power supply(ies) configurations when swapping in the new iMac? Sometimes a vulnerable device or power supply is badly affected by sharing a power source with a dirty device; e.g., we used to go crazy trying to keep people from plugging in very noisy (dirty) fluorescent lamps/ballasts on the same circuit/outlet/power strip, and then they’d have all kinds of nasty crashes, audible noise coming from speakers, etc. This continues today with crappy AC/DC power adapters for chargers, LED lamps, smart outlets, and more.
Try isolating the hub’s power to an outlet that isn’t hosting the iMac or anything else connected to it; even considering running an extension cord from a known-separate circuit.
— as noted above, radio interference is still possible; is the hub newly located, or just generally located near anything generating RF? Other bad power adapters, unshielded devices (like the now infamous gen 1 LG 5K that whacked WiFi), etc. Can create RF that makes the hub look bad. Just because your old iMac wasn’t vulnerable to the noise, perhaps your new iMac is far more sensitive to line noise.
— any change in connected cables to or from the hub? A cheap cable, or one whose shielding has gone bad, or has been extended with a USB-A/C male/female has been known to cause problems.
— as for the Apple Wireless still requiring three keystrokes, this isn’t normal, either; nor would I find it acceptable. Can you try tapping any keys while it is still booting up, showing progress bar, but before login, and still see the need for three taps before the first character is accepted?
Better still, can you navigate the login screen (Tab, Escape, Space, Return/Enter, alpha-select, arrows, etc.) reliably, before the actual password field is in focus (you may need to create a second user so you are greeted with the choice screen) without touching a mouse or other pointer, without dropping any keystrokes? If yes, is the password field still dropping keystrokes?
My thinking here is that the keyboard is “sleeping” and not handshaking with the iMac properly until you tap it an extra two times. Perhaps first establishing there’s a valid connection first will help narrow it down further.
— fwiw, I’ve had trouble on an older iMac since High Sierra where the cursor and focus appears to be in the password field, where it should land automatically, but really isn’t, and I have to actually click on the password field with a pointing device, or Tab into the field before it will take keystrokes. Maybe try this?
I’m sure there’s more we can do to nail this down, if you’re not bored with the issue at this point.
Cheers
F