The idea of anything being compulsory offends me, but some things like public education seem to depend on it. The only thing that can ameliorate my distaste for something being compulsory is if it is free. That is indeed the principle behind public education in the advanced countries, that it should be both free and compulsory, so that everyone gets a basic education, whether they want to or not, but it is provided at no cost by the state.
I believe that some things related to genealogy are so important that they should also be made free and compulsory.
Two things stand out in my mind.
First, each individual should provide enough information to locate him or her in what I think of as genealogical space, but you might prefer to think of as a global genealogical tree. People who cannot provide this information should be helped to obtain it as part of what is really their education. Knowledge of self is an essential part of the basic knowledge an educated person needs.
Secondly, individuals should be required to obtain DNA samples. This is not the same as a requirement to provide DNA samples to governments. Access to the information obtained from DNA should be entirely under the control of the individual, except in certain specific situations. That is a separate issue, discussed elsewhere. The key thing is that everyone have a DNA profile, which can easily be compared with that of others for genealogical purposes. Doing such comparisons should be voluntary, but making them easy is important. Other reasons for having universal DNA analysis are discussed elsewhere.
Two things ameliorate the distasteful aspects of requiring DNA information to be collected for individual use. First, this service will be provided free of charge, and secondly a number of powerful software tools for making use of it will be provided, also free of charge.
These proposals raise a great many issues, and will be controversial. I am myself greatly disturbed at the idea of making any such thing compulsory. But I believe the benefits to society greatly outweigh the risks.