One sure way to have a dynamic "private" variable inside a custom control is to name it using the clientId of from one of its components.
Create a panel that wraps the content of the custom control. Set an id on the panel to wrapper.
To set the scoped variable:
viewScope.put( getClientId( 'wrapper' ), 'someValue' )
To get the scoped variable:
viewScope.get( getClientId( 'wrapper' ) )
This way, you can use the control multiple times in an XPages without having to worry about one custom control overwriting another controls scoped variables. If you need more "private" scoped variables, simply use the clientId as the base. E.g. 'title-' + getClientId( 'wrapper' ).
If you want to use private scoped variables as data source for fields, you need to bind the variables dynamically.