That’s...not what parent typed. Use whatever keyboard you like, but you’ll only get E2EE with an Apple keyboard.
Man in the middle is hard to prevent when you need to be compatible with incredibly broken insecure legacy protocols.
Apple could maybe go the route that all new Apple keyboards only work with new Macs and iOS devices, but that would mean that they can't work with any existing Apple hardware or third party systems.