For the Kodi box get series-7 Intel NUC with Kabylake-era processors, gen 7. They don't run Windows 11, so come very cheap second hand, but decode h264 and hevc in hardware and drive a 4K screen like charm. You can install a modern Wifi card in the NUC and a PCIe SSD.
Then buy one of these: https://www.pulse-eight.com/p/154/intel-nuc-hdmi-cec-adapter and put it in your NUC, so you can use the TV remote to control Kodi.
That's it.
Bonus, you can take your TV with you when travelling.