How exactly would a Type II civilization, according to the Kardashev scale, have to structure its economy, governing body and society in order to be a viable system?
For more information on the Kardashev scale and a Type II civilizations, you can go here
in short, A Type II civilization is a civilization capable of harnessing energy, among other ways, directly from its solar systems star, by means of a Dyson sphere. This method of energy production implies a capacity for energy to matter as well as matter to energy conversion, in layman's terms, make anything out of "electricity" and turn anything into "electricity" (E = mc^2 and all that). So basically, as long as you can keep harnassing solar energy, you can create anything, thus eliminating any form of scarcity.
For the purposes of this query, I will also assume that that level of technological advancement implies an equal level of sophistication into many other branches of science, medical (organ or appendage regeneration/reconstruction, longevity, cloning, genetic engineering etc), space travel (interstellar, at the very least), industry from the macro (robots) to nano scale (nanobots), and the capacity for many other scientific breakthroughs.
In essence, the purpose of this query is to better understand how would a significantly advanced civilization even work. Be it alien or not, the likes of Star Trek, Star Wars, Stargate, Halo etc that are never fleshed out enough in canon and never have their mechanics and structure explained (they are always advanced, but never with a reason as to how or why ). it has always bugged me.
So, keeping all that in mind:
How would the economy work, if it could still be called an "economy" if any demand could be met, and all the supply was provided by the sun?
What form of government would be necessary for a society of this scope, what would be the requirements? (in a perfect world where personal competence was an actual factor for being appointed to a governing position), (Technocratic government maybe? and if so how would that look like)
How would such a society look like, assuming that with the advancements to space travel allowing for far-reaching space exploration (for stars to harvest for resources and planets to colonise ) thus an ever increasing risk of alien first contact with either peaceful or aggressive alien races (pretty much, as an example, The British Empire during its colonial period, but applied to a technologically advanced society with appropriate ethical standards)?
Also just to spell it out, there are more galaxies in the cosmos then there are stars in our galaxy, and more stars in our galaxy then there are grains of sand on all our beaches on earth, it is statistically impossible that we are the only sentient life in the cosmos.
Would religion still be a factor after we start exploring the stars and maybe discover alien life? Or after we expand our lifespans through medical means, or otherwise?
A few things that come to mind in that sort of context: Mandatory military service, Alternative mandatory service (some form of mandatory service right out of school, so that all citizens contribute a bare minimum to their society) and Socialist like workforce management (everybody must work somewhere, do something, education, healthcare, military, industry, research, media, entertainment etc) (if the word "socialist" offends you then call it whatever you like)
Basically no lazy people, but that's just my wishful thinking since health care, food and housing are literally free in this theoretical society, there is no reason for people to work. Although an argument could be made that if the Aliens attack as the cliche may be, the military shouldn't have to fight to save the lazy and indolent. My argument here is that we may all be born free and whatnot, but we are not born entitled, no one is obligated to help or fight for us if we can't at the very least do so for ourselves, we are not the centre of the universe, we must all contribute.
If this question has already been asked in another form or another StackExchange, please point me there, otherwise, i hope this question was comprehensive enough.
If there are any books, sites or whatnot out there covering any of these topics please reference them, since I probably never heard of them.