The main issue is the spread of pathogens, human faeces can harbour some nasty diseases, notably e-coli, hepatitis and cholera. Accumulation can also provide an environment where pathogens can survive for a long time and there is a significant risk of them leeching into water supplies.
There is also a problem with any animal waste that if it accumulates in water supplies it creates excessive nutrient levels which promote the growth of algae and bacteria which, as well as being a health hazard can over-grow and crowd out other organisms.
It has also been suggested that metabolic products from drugs and things like hormone based contraceptives can cause environmental problems. Although it is obviously more complex to establish causality with this.
For the above reasons much more care needs to be exercise when using human waste as fertiliser than with manure from other animals. However if properly handled, composting can be a simple and effective way to make it safe. This both allows the more accessible nutrients which tend to promote unwanted microorganisms to be broken down and, if done properly can reach temperatures where harmful organisms are killed off, at least to safe levels.
A more technical solution is something like an anaerobic digester, these are becoming increasingly popular, especially in industrial agriculture to create revenue from crop and animal waste and have the advantage that they make use of the energy in the waste as well as the minerals and nitrates. Here controlled conditions and selected microorganisms are used to generate methane from the waste slurry. It is even potentially possible that they could be engineered to produce plastics or other chemical feed-stocks.
Obviously when you are talking about human waste you also need to take social and cultural behaviour into account. Most people in the developed world are now deeply ingrained with the idea of getting rid of their bodily waste instantly and, ideally without even seeing it and any significant change in this behaviour may be a hard sell, at least at first, unless you can offer some very significant benefits. This is, of course a very new thing and it is not that long ago that there was thriving industry in human waste for all sorts of industrial purposes. and there are some parts of the world where it is actually a challenge to persuade people to use toilets, even when they are available.
Of course another major source of waste is that we tend to spend huge resources on making water safe to drink and then use most of it just for flushing toilets, irrigation etc and only drink a tiny percentage of it.