What I can tell all accounts are separate, so games are locked to the account they where purchased on. It doesn't matter what type of account it is.
So a sub account is separate from the main account it's associated with.
So you just need to move a sub account from one machine to another.
From what I can tell all a sub account means, certain restrictions like age and how much money that can be spent are controlled by the master account it's associated with.
This site explains it it in more detail
http://www.playstationlifestyle.net/2016/07/21/sharing-games-on-ps4/#/slide/1
Activating a PS4 as your PSN ID’s primary console will allow any user on that console to play games redeemed on your account.
When you activate a system, other users of the system can use applications and enjoy some of the PlayStation®Plus benefits of your account, even if that user is not logged in.
So currently if you have PlayStation Plus on your account and on the primary console any other account on that PS4 can play your games/use "some" play station plus benefits.
When your son moves his sub account to the new PS4 from what I can tell he can set this console as
his Primary console. He'll should have access to any games purchased & downloaded on his account, but not yours.
If he wanted to play games downloaded on your account you would have to log in on his PS4 with your account details. You need to be logged in to play these games. (If this was you primary console you shouldn't need to be logged in.)
Also this is the easiest way to transfer accounts from one ps4 to another.
https://blog.eu.playstation.com/2016/11/09/how-to-transfer-your-data-from-ps4-to-ps4-pro/