This is tricky and I’m not sure that you can have all that you would like.
You may need to limit his out of cage times to those time when you can directly supervise him. As you are well aware, a 5 year old will not have the spacial awareness that we do.
A regular routine and positive reinforcement can help the ‘back in cage’ situation. Have his favourite foods only available in his open cage to make that place appealing and necessary.
I think you need first to watch Kowhai and observe what he actually does when he’s on the floor:
If it’s crumb searching, eliminate the crumbs I.e. does your son sit on the carpet with his lunch/snacks, leaving tasty crumbs to find? Maybe a new person rule to only eat at the kitchen table?
If it’s investigating toys, you could consider whether buying a tuff spot or something similar would help https://www.amazon.co.uk/CrazyGadget...t+stands&psc=1
they’re great for containing small construction toy pieces into one area.
If it’s just that he wants to be around you and your son then I’m not sure how much you can do about that, other than limiting Kowhai’s freedom to times when either your son isn’t around, or you can supervise.
You could perhaps also consider a small sturdy portable bird stand that could be placed on the floor beside your playing son if you feel that Kowhai might stay on it.
Whatever you do, I think it would still be good to have a routine with Kowhai confined to his cage for at least some part of the day. You would all would benefit from him being used to amusing himself there, as you may at some point need to board him, or have a lot of visitors around etc.
So my advice is observe first, consider if the attractions can be removed or contained, think through your human routines and how you can devise a timetable to allow some freedom for both humans and bird, consider how you can perhaps split Kowhai’s favoured food allowance to make confinement more appealing and also consider the room layout; could you perhaps reposition the cage beside the human favoured end of the sofa so Kowhai feels less isolated.
Best of luck.