In order to unlock all engrams by using two Nirvana Tonics, you would have to gain 1922 ((7004-3160)/2) engram points twice, which means you would have to achieve Level 79 each time which would give you 1950 engram points before taking the Nirvana Tonic. After which you would have to level back up to level 100 in order to unlock all possible engrams.
Engrams unlocked before consuming the Nirvana Tonic will be kept. If you are leveling up via crafting, it is recommended that you unlock the engram you will be using before you consuming the Nirvana Tonic.
Engram points not spent will be kept after consuming a Nirvana Tonic.
Due to the complexity and amount of time it would take to unlock all engrams, it may just be easier to collect blueprints and use the Mindwipe Tonic to redistribute your engram points when needed.