Without seeing all of the code, I think there is one fundamental problem you are facing: you either have not read the data sheet section for the RTCC, or you do not understand it.
Please read Section 17.2.7 as it shows how to properly unlock the RTCCFG register.
I am not that familiar with the XC8 compiler but I believe there are library calls such as 'RtccWrOn()' that can unlock the RTCCFG register. If not then you may need to learn how to embed the assembler instructions in the data sheet. (You may be tempted to just write the equivalent C code but be warned that the generated code may not work - unlocking the RTCCFG register requires that some of the code is executed in consecutive machine instructions - something the C compiler is not required to do.)
Therefore you need to first unlock the RTCCFG, set the RTCWREN bit and THEN set up the other bits, in particular the RTCEN bit.
I note that your code sequence in post #4 explicitly clears the RCTWREN bit and tries to write to the RTCEN bit - as stated in the first sentence of Section 17.1.4, the write to RTCEN with the RTCWREN bit clear is explicitly ignored.
There is also another approach you can take: use the MCC to generate the RTCC code for you. If you are wanting to simply get code that 'works' then this may be the way to go. If you want to write your own code, then you can use the MCC generated code as an example, study it and understand what it is doing and then try your own code.
Susan