Wouldn't a switch with ONIE [1] and Sonic NOS support [2] do the trick?
(I don't know the prices of such switches or whether they are available to prosumers, which would explain why almost nobody has them in a homelab)
[1] https://opencomputeproject.github.io/onie/ [2] https://sonicfoundation.dev/