Sure you can, you just need to replace the components that don't let you with ones that allow your custom OS.
We're discussing consumer hardware.
Can a consumer "just" replace the components of their iPhone? No, they cannot.
Sure you can, you just need to replace the components that don't let you with ones that allow your custom OS.