How to kill Apple magic trackpad/keyboard connection messages
If you use the bluetooth menu item, disconnect from any devices that you don't want to show the message.

You could also automate that UI control with Automator. Open that and then make an automation action that uses the "Watch Me Do" tool to record the things you select.

That way you could assign a keyboard shortcut to have both devices disconnect and another to reconnect them when you wish.

Maybe someone else knows how to kneecap the messages, but this would work with what I know.