Your local building codes dictate what you are legally allowed to do with regards to sewage treatment, and related construction, onsite. That said, let's address your questions:
Is it necessary to have air vent pipe? but it could cause some foul smell.
Answer: YES, a cesspit is a holding cell and generally not intended to be a treatment component of a wastewater system regardless of whether it allows leaching or not.
Would it be a problem if percolation tank is nearby building wall?
Answer: Since you mention "percolation tank", the answer would be a resounding YES, as this would likely present a potential hazard to the nearby structure. You need a minimum of 10-15ft from any structure for this type of construction. (Consult your local building codes.)
Should I bury the percolation tank like one foot below with plastic cap just to take the water out so the cement ring cap doesn't come into human contact as well as there won't be any space for the gas to escape?
Answer: The short answer is NO, and since you have to ask this question, you probably shouldn't be constructing a waste holding tank in the first place. By failing to bring your tank cap to at least surface level (with proper drainage precautions surrounding the cap), and since the tank is non-sealed you are inviting rainwater infiltration which will prematurely fill your tank and ultimately create a potential health hazard in the process. The installation of a below-grade cap will likely cause the soil above your tank to become saturated with wastewater over time should a rain event fill the tank and cause surface seepage.
Is it true that if Percolation tank is just 5 feet or less water percolation would be high as air pressure will increase the percolation ?
Answer: NO. I have no idea where this claim comes from, water percolation is a primary function of soil type/composition. I would also suggest that the waste management solution you are proposing here is a poor choice, and frankly, without understanding WHY you think you need a cesspit in your system in the first place, it's difficult to understand the rationale behind it except possibly that you have limited property space for disposal and you have drain field problems, or you are located in a country/region where there are little to no regulations on human wastewater disposal. If your reason behind this cesspit idea is that you are having problems with a drain field - you should FIX the drain field. (I know fixing a drain field is usually expensive, but there really is no shortcut around this if your field is no longer functioning correctly.)
A cesspit or dry-well doesn’t accomplish any kind of wastewater treatment. The purpose of this component is simply to HOLD waste until it can be safely removed for later treatment at some other location, essentially functioning much like a pit latrine or portable toilet (aka "Porta-Potty"). The fact that you are attaching this to a septic tank doesn't really change its purpose (see later comment), especially without explaining the purpose behind that decision.
Another issue that you have implied with your "percolation" comment is that you may be thinking this cesspit will take the place of a proper septic drain field (also called a leach field) which is constructed to take the effluent from a septic tank and complete the treatment of the wastewater back into the soil via a disbursed filtration process that utilizes soil and microbial activity to treat the bacteria and pathogens contained in the waste. A cesspit that leaches does not provide for the proper decomposition of waste, and over time, the solid waste will eventually compost and eventually block the liquids from leaching anyway. This will likely result in surface seepage of the wastewater at some point later.
The leaching question also brings up another very important issue: even though you may think you are taking "treated" waste from the septic tank (nothing in the tank is fully treated), if you do not properly construct that connection, you may simply be depositing untreated waste into the groundwater system thereby exposing those in your household or nearby neighbors to harmful bacteria and pathogens that have not yet been removed from the wastewater. If indeed you understand how this works, have a proper purpose for inclusion in your system, and know exactly HOW to tap this off of your septic tank, then your intended construction MAY be a viable option, but given the questions and the lack of certain information that might justify this modification to your existing system, I'm not confident this is the case or even a good idea.
The most salient point of my response is that if you don't fully understand how to handle and treat human/household wastewater or have a firm grasp on how to safely and properly construct a complete septic system, you probably should consult a local professional and at least confirm your design and construction plans before you do something that might cause others to get sick, or worse yet suffer or die from a disease (like cholera) that could have been prevented. We don't think of wastewater today as being a serious health issue because of the wastewater treatment advancements in our modern era that have essentially removed this threat from our existence. But even stepping back into the mid 19th century will reveal how devastating this issue can be if not dealt with properly. (A time when cesspits and cesspools were the technology of the day I might add.)
One last thought on cesspits and onsite wastewater handling. In the United States many counties and other jurisdictions do not permit the sale of residential property that utilizes a waste cesspit or cesspool, and if you construct one without a permit, you may be forced by the local authorities to PAY to have that cesspit removed from your property or your property can be condemned and you can be forced to vacate the property.
I would encourage anyone who has little to no experience in construction to thoroughly research your projects before you begin, and make sure you understand WHY things are specified, and codified, for whatever your project subject - be it excavation, drainage, wastewater treatment, plumbing, electrical, environmental (as in heating/air/ventilation), etc. These are all typical trades which require years of experience to become proficient in their design, construction techniques, and installation processes and while the modern DIY craze has allowed a number of people to save a few dollars on even complex home maintenance and upgrade projects, I often come back to a quote I remember from my grandfather "If you think a professional is expensive - hire an amateur".