Apple already has Sidecar that turns your iPad into a monitor. It's not a stretch to enable that feature on Mac so you can turn your Mac into a monitor too whenever you need it for some reason.
That is another sad story. As far as I know, Sidecar works in both directions, you can use it to make your iMac a monitor for another mac. However, there is a huge catch: those two devices need to run on the same Apple ID. Which of course makes it impossible when trying to connect your work with your private computer. Of all companies, Apple should have an understanding of keeping your work files in a separate environment :p.